@atlashub/smartstack-cli 1.35.0 → 1.36.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/package.json +1 -1
- package/templates/skills/_shared.md +7 -7
- package/templates/skills/application/steps/step-04-backend.md +17 -17
- package/templates/skills/application/steps/step-05-frontend.md +4 -1
- package/templates/skills/application/templates-backend.md +8 -8
- package/templates/skills/application/templates-frontend.md +8 -8
- package/templates/skills/gitflow/_shared.md +188 -53
- package/templates/skills/gitflow/phases/abort.md +28 -16
- package/templates/skills/gitflow/phases/cleanup.md +13 -9
- package/templates/skills/gitflow/phases/status.md +16 -17
- package/templates/skills/gitflow/steps/step-commit.md +11 -5
- package/templates/skills/gitflow/steps/step-finish.md +43 -33
- package/templates/skills/gitflow/steps/step-init.md +7 -2
- package/templates/skills/gitflow/steps/step-merge.md +24 -10
- package/templates/skills/gitflow/steps/step-pr.md +42 -28
- package/templates/skills/gitflow/steps/step-start.md +19 -13
- package/templates/skills/gitflow/templates/config.json +7 -4
- package/templates/skills/ralph-loop/SKILL.md +57 -11
- package/templates/skills/ralph-loop/steps/step-00-init.md +170 -30
- package/templates/skills/ralph-loop/steps/step-01-task.md +243 -40
- package/templates/skills/ralph-loop/steps/step-02-execute.md +142 -24
- package/templates/skills/ralph-loop/steps/step-03-commit.md +140 -36
- package/templates/skills/ralph-loop/steps/step-04-check.md +128 -44
- package/templates/skills/ralph-loop/steps/step-05-report.md +175 -88
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: step-03-commit
|
|
3
|
-
description: Commit changes, update prd.json
|
|
3
|
+
description: Commit changes, update prd.json v2 with full tracking
|
|
4
4
|
next_step: steps/step-04-check.md
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -8,7 +8,7 @@ next_step: steps/step-04-check.md
|
|
|
8
8
|
|
|
9
9
|
## YOUR TASK:
|
|
10
10
|
|
|
11
|
-
Commit the changes from the executed task,
|
|
11
|
+
Commit the changes from the executed task, finalize task tracking in prd.json, and append to history.
|
|
12
12
|
|
|
13
13
|
---
|
|
14
14
|
|
|
@@ -20,12 +20,16 @@ Commit the changes from the executed task, update prd.json and progress.txt.
|
|
|
20
20
|
|
|
21
21
|
```bash
|
|
22
22
|
git add {files_created} {files_modified}
|
|
23
|
+
|
|
24
|
+
# Also stage prd.json (already updated in step-02)
|
|
25
|
+
git add .ralph/prd.json
|
|
23
26
|
```
|
|
24
27
|
|
|
25
28
|
**Verify staged changes:**
|
|
26
29
|
|
|
27
30
|
```bash
|
|
28
31
|
git status
|
|
32
|
+
git diff --cached --stat
|
|
29
33
|
```
|
|
30
34
|
|
|
31
35
|
### 2. Create Commit
|
|
@@ -34,47 +38,107 @@ git status
|
|
|
34
38
|
|
|
35
39
|
```bash
|
|
36
40
|
git commit -m "$(cat <<'EOF'
|
|
37
|
-
|
|
41
|
+
{PREFIX}({scope}): {current_task_description}
|
|
38
42
|
|
|
39
43
|
Task {current_task_id}/{tasks_total} - Iteration {current_iteration}
|
|
44
|
+
Category: {current_task_category}
|
|
40
45
|
|
|
41
46
|
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
42
47
|
EOF
|
|
43
48
|
)"
|
|
44
49
|
```
|
|
45
50
|
|
|
46
|
-
**
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
+
**Determine commit prefix from category:**
|
|
52
|
+
|
|
53
|
+
| Category | Prefix | Scope |
|
|
54
|
+
|----------|--------|-------|
|
|
55
|
+
| `domain` | `feat` | entity name or module |
|
|
56
|
+
| `application` | `feat` | module name |
|
|
57
|
+
| `infrastructure` | `db` | migrations / config |
|
|
58
|
+
| `api` | `feat` | controller name |
|
|
59
|
+
| `frontend` | `feat` | component/page name |
|
|
60
|
+
| `i18n` | `chore` | i18n |
|
|
61
|
+
| `test` | `test` | module name |
|
|
62
|
+
| `validation` | `chore` | validation |
|
|
63
|
+
| `other` | `chore` | ralph |
|
|
64
|
+
|
|
65
|
+
**Get commit hash:**
|
|
66
|
+
```bash
|
|
67
|
+
COMMIT_HASH=$(git rev-parse --short HEAD)
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### 3. Finalize Task in prd.json
|
|
51
71
|
|
|
52
|
-
|
|
72
|
+
**Mark task as completed with all tracking data:**
|
|
53
73
|
|
|
54
|
-
|
|
74
|
+
```javascript
|
|
75
|
+
const prd = readJSON('.ralph/prd.json');
|
|
76
|
+
const task = prd.tasks.find(t => t.id === {current_task_id});
|
|
77
|
+
const now = new Date().toISOString();
|
|
55
78
|
|
|
56
|
-
|
|
57
|
-
{
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
79
|
+
// Only mark completed if not already failed in step-02
|
|
80
|
+
if (task.status !== 'failed') {
|
|
81
|
+
task.status = 'completed';
|
|
82
|
+
}
|
|
83
|
+
task.completed_at = now;
|
|
84
|
+
task.iteration = prd.config.current_iteration;
|
|
85
|
+
task.commit_hash = COMMIT_HASH;
|
|
86
|
+
|
|
87
|
+
// files_changed already set in step-02, but verify
|
|
88
|
+
if (!task.files_changed || (!task.files_changed.created.length && !task.files_changed.modified.length)) {
|
|
89
|
+
// Fallback: extract from git diff
|
|
90
|
+
task.files_changed = {
|
|
91
|
+
created: getGitNewFiles(), // git diff --cached --name-only --diff-filter=A
|
|
92
|
+
modified: getGitModifiedFiles() // git diff --cached --name-only --diff-filter=M
|
|
93
|
+
};
|
|
64
94
|
}
|
|
65
95
|
```
|
|
66
96
|
|
|
67
|
-
|
|
97
|
+
### 4. Append to History
|
|
98
|
+
|
|
99
|
+
**Add structured iteration entry:**
|
|
68
100
|
|
|
69
101
|
```javascript
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
task.
|
|
73
|
-
|
|
102
|
+
prd.history.push({
|
|
103
|
+
iteration: prd.config.current_iteration,
|
|
104
|
+
task_id: task.id,
|
|
105
|
+
action: task.status, // "completed" or "failed"
|
|
106
|
+
timestamp: now,
|
|
107
|
+
commit_hash: COMMIT_HASH,
|
|
108
|
+
duration_seconds: Math.round(
|
|
109
|
+
(new Date(now) - new Date(task.started_at)) / 1000
|
|
110
|
+
),
|
|
111
|
+
notes: "{What was learned or accomplished during this task}"
|
|
112
|
+
});
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### 5. Increment Iteration and Update Timestamps
|
|
116
|
+
|
|
117
|
+
**IMPORTANT: Increment AFTER recording the current iteration in task and history.**
|
|
118
|
+
|
|
119
|
+
```javascript
|
|
120
|
+
prd.config.current_iteration++;
|
|
121
|
+
prd.updated_at = now;
|
|
122
|
+
|
|
123
|
+
// Update top-level status
|
|
124
|
+
const allCompleted = prd.tasks.every(t =>
|
|
125
|
+
t.status === 'completed' || t.status === 'skipped'
|
|
126
|
+
);
|
|
127
|
+
const anyFailed = prd.tasks.some(t => t.status === 'failed');
|
|
128
|
+
const anyBlocked = prd.tasks.some(t => t.status === 'blocked');
|
|
129
|
+
|
|
130
|
+
if (allCompleted) {
|
|
131
|
+
prd.status = 'completed';
|
|
132
|
+
} else if (anyFailed || anyBlocked) {
|
|
133
|
+
prd.status = 'partial';
|
|
134
|
+
} else {
|
|
135
|
+
prd.status = 'in_progress';
|
|
136
|
+
}
|
|
137
|
+
|
|
74
138
|
writeJSON('.ralph/prd.json', prd);
|
|
75
139
|
```
|
|
76
140
|
|
|
77
|
-
###
|
|
141
|
+
### 6. Update progress.txt
|
|
78
142
|
|
|
79
143
|
**Append learnings to progress.txt:**
|
|
80
144
|
|
|
@@ -85,10 +149,17 @@ writeJSON('.ralph/prd.json', prd);
|
|
|
85
149
|
|
|
86
150
|
### Task Completed
|
|
87
151
|
[{current_task_id}] {current_task_description}
|
|
152
|
+
Category: {current_task_category}
|
|
153
|
+
Status: {task.status}
|
|
154
|
+
Commit: {COMMIT_HASH}
|
|
88
155
|
|
|
89
156
|
### Files Changed
|
|
90
|
-
- Created: {
|
|
91
|
-
- Modified: {
|
|
157
|
+
- Created: {task.files_changed.created}
|
|
158
|
+
- Modified: {task.files_changed.modified}
|
|
159
|
+
|
|
160
|
+
### Acceptance Criteria
|
|
161
|
+
{current_task_criteria}
|
|
162
|
+
Result: ✅ Met / ❌ Not met
|
|
92
163
|
|
|
93
164
|
### Learnings
|
|
94
165
|
{What was learned during this task}
|
|
@@ -99,20 +170,38 @@ writeJSON('.ralph/prd.json', prd);
|
|
|
99
170
|
{What the next iteration should know}
|
|
100
171
|
```
|
|
101
172
|
|
|
102
|
-
###
|
|
173
|
+
### 7. Commit prd.json and progress.txt Updates
|
|
174
|
+
|
|
175
|
+
**Stage and commit the tracking files separately:**
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
git add .ralph/prd.json .ralph/progress.txt
|
|
179
|
+
git commit -m "$(cat <<'EOF'
|
|
180
|
+
chore(ralph): update progress - task {current_task_id}/{tasks_total}
|
|
181
|
+
|
|
182
|
+
Iteration {current_iteration} complete
|
|
183
|
+
Status: {task.status}
|
|
184
|
+
|
|
185
|
+
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
186
|
+
EOF
|
|
187
|
+
)"
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### 8. Verify Commit
|
|
103
191
|
|
|
104
192
|
**Check commit was created:**
|
|
105
193
|
|
|
106
194
|
```bash
|
|
107
|
-
git log -
|
|
195
|
+
git log -2 --oneline
|
|
108
196
|
```
|
|
109
197
|
|
|
110
198
|
**Expected output:**
|
|
111
199
|
```
|
|
112
|
-
|
|
200
|
+
def5678 chore(ralph): update progress - task {id}/{total}
|
|
201
|
+
abc1234 feat(scope): {current_task_description}
|
|
113
202
|
```
|
|
114
203
|
|
|
115
|
-
###
|
|
204
|
+
### 9. Log Activity (if verbose)
|
|
116
205
|
|
|
117
206
|
**If {verbose_mode} = true:**
|
|
118
207
|
|
|
@@ -120,9 +209,13 @@ Append to `.ralph/logs/{date}.log`:
|
|
|
120
209
|
```
|
|
121
210
|
[{timestamp}] TASK COMPLETED
|
|
122
211
|
Task: [{current_task_id}] {current_task_description}
|
|
123
|
-
|
|
124
|
-
|
|
212
|
+
Category: {current_task_category}
|
|
213
|
+
Status: {task.status}
|
|
214
|
+
Commit: {COMMIT_HASH}
|
|
215
|
+
Files: {file_count} changed ({created_count} created, {modified_count} modified)
|
|
216
|
+
Duration: {duration_seconds}s
|
|
125
217
|
Iteration: {current_iteration}
|
|
218
|
+
Validation: {validation_result}
|
|
126
219
|
```
|
|
127
220
|
|
|
128
221
|
---
|
|
@@ -134,13 +227,17 @@ Changes Committed:
|
|
|
134
227
|
|
|
135
228
|
| Field | Value |
|
|
136
229
|
|-------|-------|
|
|
137
|
-
| Commit | {
|
|
138
|
-
| Task | [{current_task_id}]
|
|
230
|
+
| Commit | {COMMIT_HASH} |
|
|
231
|
+
| Task | [{current_task_id}] {current_task_description} |
|
|
232
|
+
| Category | {current_task_category} |
|
|
233
|
+
| Status | {task.status} |
|
|
139
234
|
| Iteration | {current_iteration} |
|
|
140
235
|
| Files | {file_count} changed |
|
|
236
|
+
| Duration | {duration_seconds}s |
|
|
237
|
+
| Validation | {validation_result} |
|
|
141
238
|
|
|
142
|
-
prd.json:
|
|
143
|
-
progress.txt:
|
|
239
|
+
prd.json: Task {current_task_id} → {task.status}, history entry added
|
|
240
|
+
progress.txt: Iteration {current_iteration} learnings appended
|
|
144
241
|
|
|
145
242
|
-> Checking completion...
|
|
146
243
|
```
|
|
@@ -163,6 +260,13 @@ progress.txt: Added iteration {current_iteration} learnings
|
|
|
163
260
|
2. Retry write
|
|
164
261
|
3. If still fails, output error and stop
|
|
165
262
|
|
|
263
|
+
**If task was failed in step-02:**
|
|
264
|
+
|
|
265
|
+
1. Still commit whatever was done (partial progress)
|
|
266
|
+
2. task.status remains "failed"
|
|
267
|
+
3. history entry records action: "failed"
|
|
268
|
+
4. step-04 will handle downstream blocking
|
|
269
|
+
|
|
166
270
|
---
|
|
167
271
|
|
|
168
272
|
## NEXT STEP:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: step-04-check
|
|
3
|
-
description: Check completion criteria
|
|
3
|
+
description: Check completion criteria with status-based logic
|
|
4
4
|
next_step: steps/step-05-report.md OR steps/step-01-task.md
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -8,7 +8,7 @@ next_step: steps/step-05-report.md OR steps/step-01-task.md
|
|
|
8
8
|
|
|
9
9
|
## YOUR TASK:
|
|
10
10
|
|
|
11
|
-
Check if all tasks are complete and decide whether to output completion promise or continue to next task.
|
|
11
|
+
Check if all tasks are complete and decide whether to output completion promise or continue to next task. Uses v2 status-based checks instead of boolean `passes`.
|
|
12
12
|
|
|
13
13
|
---
|
|
14
14
|
|
|
@@ -20,50 +20,74 @@ Check if all tasks are complete and decide whether to output completion promise
|
|
|
20
20
|
|
|
21
21
|
```javascript
|
|
22
22
|
const prd = readJSON('.ralph/prd.json');
|
|
23
|
-
|
|
24
|
-
const
|
|
25
|
-
const
|
|
23
|
+
|
|
24
|
+
const tasksCompleted = prd.tasks.filter(t => t.status === 'completed').length;
|
|
25
|
+
const tasksSkipped = prd.tasks.filter(t => t.status === 'skipped').length;
|
|
26
|
+
const tasksFailed = prd.tasks.filter(t => t.status === 'failed').length;
|
|
27
|
+
const tasksBlocked = prd.tasks.filter(t => t.status === 'blocked').length;
|
|
28
|
+
const tasksPending = prd.tasks.filter(t => t.status === 'pending').length;
|
|
29
|
+
const tasksTotal = prd.tasks.length;
|
|
30
|
+
|
|
31
|
+
const allDone = (tasksCompleted + tasksSkipped) === tasksTotal;
|
|
32
|
+
const hasFailures = tasksFailed > 0;
|
|
33
|
+
const hasBlocked = tasksBlocked > 0;
|
|
34
|
+
const hasPending = tasksPending > 0;
|
|
26
35
|
```
|
|
27
36
|
|
|
28
37
|
### 2. Check Iteration Limit
|
|
29
38
|
|
|
30
|
-
**If
|
|
39
|
+
**If `prd.config.current_iteration` > `prd.config.max_iterations`:**
|
|
31
40
|
|
|
32
41
|
```
|
|
33
42
|
╔══════════════════════════════════════════════════════════════════╗
|
|
34
|
-
║ ⚠️ MAX ITERATIONS REACHED
|
|
43
|
+
║ ⚠️ MAX ITERATIONS REACHED ║
|
|
35
44
|
╠══════════════════════════════════════════════════════════════════╣
|
|
36
|
-
║ Iterations: {current_iteration} / {max_iterations}
|
|
37
|
-
║ Tasks: {tasksCompleted} / {tasksTotal} complete
|
|
45
|
+
║ Iterations: {current_iteration} / {max_iterations} ║
|
|
46
|
+
║ Tasks: {tasksCompleted} / {tasksTotal} complete ║
|
|
47
|
+
║ Failed: {tasksFailed} | Blocked: {tasksBlocked} ║
|
|
38
48
|
╠══════════════════════════════════════════════════════════════════╣
|
|
39
|
-
║ Ralph loop stopped due to iteration limit.
|
|
40
|
-
║ Remaining tasks:
|
|
41
|
-
║ {list of tasks with
|
|
49
|
+
║ Ralph loop stopped due to iteration limit. ║
|
|
50
|
+
║ Remaining tasks: ║
|
|
51
|
+
║ {list of tasks with status != completed and != skipped} ║
|
|
42
52
|
╚══════════════════════════════════════════════════════════════════╝
|
|
43
53
|
|
|
44
54
|
-> Generating partial report...
|
|
45
55
|
```
|
|
46
56
|
|
|
57
|
+
**Update prd.json:**
|
|
58
|
+
```javascript
|
|
59
|
+
prd.status = 'partial';
|
|
60
|
+
prd.updated_at = new Date().toISOString();
|
|
61
|
+
writeJSON('.ralph/prd.json', prd);
|
|
62
|
+
```
|
|
63
|
+
|
|
47
64
|
**Proceed to step-05-report.md**
|
|
48
65
|
|
|
49
66
|
### 3. Check All Tasks Complete
|
|
50
67
|
|
|
51
|
-
**If
|
|
68
|
+
**If allDone = true:**
|
|
52
69
|
|
|
53
70
|
```
|
|
54
71
|
╔══════════════════════════════════════════════════════════════════╗
|
|
55
|
-
║ ✅ ALL TASKS COMPLETE
|
|
72
|
+
║ ✅ ALL TASKS COMPLETE ║
|
|
56
73
|
╠══════════════════════════════════════════════════════════════════╣
|
|
57
|
-
║ Iterations: {current_iteration}
|
|
58
|
-
║ Tasks: {
|
|
74
|
+
║ Iterations: {current_iteration - 1} ║
|
|
75
|
+
║ Tasks: {tasksCompleted} completed, {tasksSkipped} skipped ║
|
|
59
76
|
╠══════════════════════════════════════════════════════════════════╣
|
|
60
|
-
║ Output completion promise:
|
|
61
|
-
║ <promise>{completion_promise}</promise>
|
|
77
|
+
║ Output completion promise: ║
|
|
78
|
+
║ <promise>{completion_promise}</promise> ║
|
|
62
79
|
╚══════════════════════════════════════════════════════════════════╝
|
|
63
80
|
|
|
64
81
|
<promise>{completion_promise}</promise>
|
|
65
82
|
```
|
|
66
83
|
|
|
84
|
+
**Update prd.json:**
|
|
85
|
+
```javascript
|
|
86
|
+
prd.status = 'completed';
|
|
87
|
+
prd.updated_at = new Date().toISOString();
|
|
88
|
+
writeJSON('.ralph/prd.json', prd);
|
|
89
|
+
```
|
|
90
|
+
|
|
67
91
|
**CRITICAL: Output the promise tag exactly as shown:**
|
|
68
92
|
```
|
|
69
93
|
<promise>{completion_promise}</promise>
|
|
@@ -71,15 +95,48 @@ const allComplete = tasksCompleted === tasksTotal;
|
|
|
71
95
|
|
|
72
96
|
**Proceed to step-05-report.md**
|
|
73
97
|
|
|
74
|
-
### 4.
|
|
98
|
+
### 4. Check for Dead-End (all remaining are blocked/failed)
|
|
99
|
+
|
|
100
|
+
**If !hasPending AND !allDone:**
|
|
101
|
+
|
|
102
|
+
All remaining tasks are blocked or failed. No progress is possible.
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
╔══════════════════════════════════════════════════════════════════╗
|
|
106
|
+
║ ⚠️ DEAD-END DETECTED ║
|
|
107
|
+
╠══════════════════════════════════════════════════════════════════╣
|
|
108
|
+
║ Tasks: {tasksCompleted} completed, {tasksFailed} failed, ║
|
|
109
|
+
║ {tasksBlocked} blocked ║
|
|
110
|
+
╠══════════════════════════════════════════════════════════════════╣
|
|
111
|
+
║ No more tasks can be executed. ║
|
|
112
|
+
║ Failed tasks: ║
|
|
113
|
+
║ {list of failed tasks with error messages} ║
|
|
114
|
+
║ ║
|
|
115
|
+
║ Blocked tasks (downstream): ║
|
|
116
|
+
║ {list of blocked tasks with dependency info} ║
|
|
117
|
+
╚══════════════════════════════════════════════════════════════════╝
|
|
118
|
+
|
|
119
|
+
-> Generating partial report...
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
**Update prd.json:**
|
|
123
|
+
```javascript
|
|
124
|
+
prd.status = 'failed';
|
|
125
|
+
prd.updated_at = new Date().toISOString();
|
|
126
|
+
writeJSON('.ralph/prd.json', prd);
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
**Proceed to step-05-report.md**
|
|
130
|
+
|
|
131
|
+
### 5. More Tasks Remaining
|
|
75
132
|
|
|
76
|
-
**If
|
|
133
|
+
**If hasPending AND iteration < max_iterations:**
|
|
77
134
|
|
|
78
135
|
```
|
|
79
136
|
Progress: {tasksCompleted} / {tasksTotal} tasks
|
|
137
|
+
Failed: {tasksFailed} | Blocked: {tasksBlocked} | Pending: {tasksPending}
|
|
80
138
|
|
|
81
|
-
Next task
|
|
82
|
-
[{next_task_id}] {next_task_description}
|
|
139
|
+
Next eligible task will be determined by dependency resolution.
|
|
83
140
|
|
|
84
141
|
Continuing to next iteration...
|
|
85
142
|
```
|
|
@@ -95,20 +152,25 @@ Continuing to next iteration...
|
|
|
95
152
|
│ Check Completion │
|
|
96
153
|
└──────────┬──────────┘
|
|
97
154
|
│
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
155
|
+
┌────────────────────┼────────────────────┐
|
|
156
|
+
│ │ │
|
|
157
|
+
▼ ▼ ▼
|
|
158
|
+
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
|
|
159
|
+
│ Max Iters │ │ All Tasks │ │ Tasks │
|
|
160
|
+
│ Reached │ │ Done │ │ Remaining │
|
|
161
|
+
└──────┬───────┘ └──────┬───────┘ └──────┬───────┘
|
|
162
|
+
│ │ │
|
|
163
|
+
│ │ ┌────────┴────────┐
|
|
164
|
+
│ │ │ │
|
|
165
|
+
▼ ▼ ▼ ▼
|
|
166
|
+
┌──────────────┐ ┌──────────────┐ ┌─────────────┐ ┌─────────────┐
|
|
167
|
+
│ Partial │ │ Output │ │ Dead-End │ │ Loop to │
|
|
168
|
+
│ Report │ │ Promise │ │ (all blocked│ │ step-01 │
|
|
169
|
+
│ step-05 │ │ step-05 │ │ or failed) │ │ │
|
|
170
|
+
│ status: │ │ status: │ │ step-05 │ │ │
|
|
171
|
+
│ "partial" │ │ "completed" │ │ status: │ │ │
|
|
172
|
+
└──────────────┘ └──────────────┘ │ "failed" │ └─────────────┘
|
|
173
|
+
└─────────────┘
|
|
112
174
|
```
|
|
113
175
|
|
|
114
176
|
---
|
|
@@ -122,9 +184,11 @@ Completion Check:
|
|
|
122
184
|
| Field | Value |
|
|
123
185
|
|-------|-------|
|
|
124
186
|
| Iteration | {current_iteration} / {max_iterations} |
|
|
125
|
-
|
|
|
187
|
+
| Completed | {tasksCompleted} / {tasksTotal} |
|
|
188
|
+
| Failed | {tasksFailed} |
|
|
189
|
+
| Blocked | {tasksBlocked} |
|
|
190
|
+
| Pending | {tasksPending} |
|
|
126
191
|
| Status | Continuing |
|
|
127
|
-
| Next | [{next_task_id}] {next_task_description} |
|
|
128
192
|
|
|
129
193
|
-> Loading next task...
|
|
130
194
|
```
|
|
@@ -135,8 +199,9 @@ Completion Check:
|
|
|
135
199
|
|
|
136
200
|
| Field | Value |
|
|
137
201
|
|-------|-------|
|
|
138
|
-
|
|
|
139
|
-
|
|
|
202
|
+
| Iterations Used | {current_iteration - 1} |
|
|
203
|
+
| Completed | {tasksCompleted} / {tasksTotal} |
|
|
204
|
+
| Skipped | {tasksSkipped} |
|
|
140
205
|
| Status | COMPLETE |
|
|
141
206
|
|
|
142
207
|
<promise>{completion_promise}</promise>
|
|
@@ -144,19 +209,38 @@ Completion Check:
|
|
|
144
209
|
-> Generating report...
|
|
145
210
|
```
|
|
146
211
|
|
|
212
|
+
**If partial/failed:**
|
|
213
|
+
```
|
|
214
|
+
Completion Check:
|
|
215
|
+
|
|
216
|
+
| Field | Value |
|
|
217
|
+
|-------|-------|
|
|
218
|
+
| Iterations Used | {current_iteration - 1} |
|
|
219
|
+
| Completed | {tasksCompleted} / {tasksTotal} |
|
|
220
|
+
| Failed | {tasksFailed} |
|
|
221
|
+
| Blocked | {tasksBlocked} |
|
|
222
|
+
| Status | {PARTIAL or FAILED} |
|
|
223
|
+
| Reason | {max iterations / dead-end} |
|
|
224
|
+
|
|
225
|
+
-> Generating report...
|
|
226
|
+
```
|
|
227
|
+
|
|
147
228
|
---
|
|
148
229
|
|
|
149
|
-
## CRITICAL
|
|
230
|
+
## CRITICAL RULES:
|
|
150
231
|
|
|
151
232
|
**NEVER output the completion promise unless:**
|
|
152
|
-
1. ALL tasks have `
|
|
153
|
-
2.
|
|
233
|
+
1. ALL tasks have `status: "completed"` or `status: "skipped"`
|
|
234
|
+
2. Zero tasks with `status: "blocked"` or `status: "failed"`
|
|
235
|
+
3. The statement is genuinely true
|
|
154
236
|
|
|
155
237
|
**False promises to escape the loop are FORBIDDEN.**
|
|
156
238
|
|
|
239
|
+
**Always update `prd.status` and `prd.updated_at` before proceeding.**
|
|
240
|
+
|
|
157
241
|
---
|
|
158
242
|
|
|
159
243
|
## NEXT STEP:
|
|
160
244
|
|
|
161
|
-
- If complete or max iterations: `./step-05-report.md`
|
|
245
|
+
- If complete or max iterations or dead-end: `./step-05-report.md`
|
|
162
246
|
- If tasks remaining: `./step-01-task.md`
|