@atlashub/smartstack-cli 3.7.0 → 3.9.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/dist/index.js +365 -2
- package/dist/index.js.map +1 -1
- package/package.json +4 -2
- package/templates/agents/action.md +1 -0
- package/templates/agents/ba-writer.md +33 -0
- package/templates/agents/explore-codebase.md +1 -0
- package/templates/agents/explore-docs.md +1 -0
- package/templates/agents/fix-grammar.md +1 -0
- package/templates/agents/snipper.md +1 -0
- package/templates/skills/admin/SKILL.md +6 -0
- package/templates/skills/ai-prompt/SKILL.md +32 -136
- package/templates/skills/ai-prompt/steps/step-01-implementation.md +122 -0
- package/templates/skills/apex/SKILL.md +120 -0
- package/templates/skills/apex/_shared.md +86 -0
- package/templates/skills/apex/references/agent-teams-protocol.md +164 -0
- package/templates/skills/apex/references/smartstack-layers.md +173 -0
- package/templates/skills/apex/steps/step-00-init.md +156 -0
- package/templates/skills/apex/steps/step-01-analyze.md +169 -0
- package/templates/skills/apex/steps/step-02-plan.md +160 -0
- package/templates/skills/apex/steps/step-03-execute.md +166 -0
- package/templates/skills/apex/steps/step-04-validate.md +138 -0
- package/templates/skills/apex/steps/step-05-examine.md +124 -0
- package/templates/skills/apex/steps/step-06-resolve.md +105 -0
- package/templates/skills/apex/steps/step-07-tests.md +130 -0
- package/templates/skills/apex/steps/step-08-run-tests.md +115 -0
- package/templates/skills/application/SKILL.md +10 -0
- package/templates/skills/application/references/backend-controller-hierarchy.md +58 -0
- package/templates/skills/application/references/backend-entity-seeding.md +72 -0
- package/templates/skills/application/references/backend-verification.md +88 -0
- package/templates/skills/application/references/frontend-verification.md +111 -0
- package/templates/skills/application/references/nav-fallback-procedure.md +200 -0
- package/templates/skills/application/references/provider-template.md +134 -0
- package/templates/skills/application/references/test-frontend.md +73 -0
- package/templates/skills/application/references/test-prerequisites.md +72 -0
- package/templates/skills/application/steps/step-01-navigation.md +7 -198
- package/templates/skills/application/steps/step-03b-provider.md +4 -128
- package/templates/skills/application/steps/step-04-backend.md +20 -350
- package/templates/skills/application/steps/step-05-frontend.md +12 -101
- package/templates/skills/application/steps/step-07-tests.md +12 -132
- package/templates/skills/business-analyse/SKILL.md +11 -2
- package/templates/skills/business-analyse/html/ba-interactive.html +3214 -2246
- package/templates/skills/business-analyse/html/build-html.js +77 -0
- package/templates/skills/business-analyse/html/src/scripts/01-data-init.js +130 -0
- package/templates/skills/business-analyse/html/src/scripts/02-navigation.js +22 -0
- package/templates/skills/business-analyse/html/src/scripts/03-render-cadrage.js +208 -0
- package/templates/skills/business-analyse/html/src/scripts/04-render-modules.js +211 -0
- package/templates/skills/business-analyse/html/src/scripts/05-render-specs.js +554 -0
- package/templates/skills/business-analyse/html/src/scripts/06-render-consolidation.js +110 -0
- package/templates/skills/business-analyse/html/src/scripts/07-render-handoff.js +90 -0
- package/templates/skills/business-analyse/html/src/scripts/08-editing.js +45 -0
- package/templates/skills/business-analyse/html/src/scripts/09-export.js +168 -0
- package/templates/skills/business-analyse/html/src/scripts/10-comments.js +171 -0
- package/templates/skills/business-analyse/html/src/scripts/11-review-panel.js +161 -0
- package/templates/skills/business-analyse/html/src/styles/01-variables.css +38 -0
- package/templates/skills/business-analyse/html/src/styles/02-layout.css +101 -0
- package/templates/skills/business-analyse/html/src/styles/03-navigation.css +62 -0
- package/templates/skills/business-analyse/html/src/styles/04-cards.css +196 -0
- package/templates/skills/business-analyse/html/src/styles/05-modules.css +325 -0
- package/templates/skills/business-analyse/html/src/styles/06-wireframes.css +230 -0
- package/templates/skills/business-analyse/html/src/styles/07-comments.css +184 -0
- package/templates/skills/business-analyse/html/src/styles/08-review-panel.css +241 -0
- package/templates/skills/business-analyse/html/src/template.html +623 -0
- package/templates/skills/business-analyse/references/cadrage-structure-cards.md +78 -0
- package/templates/skills/business-analyse/references/cadrage-vibe-coding.md +97 -0
- package/templates/skills/business-analyse/references/consolidation-structural-checks.md +92 -0
- package/templates/skills/business-analyse/references/deploy-data-build.md +121 -0
- package/templates/skills/business-analyse/references/deploy-modes.md +49 -0
- package/templates/skills/business-analyse/references/handoff-file-templates.md +119 -0
- package/templates/skills/business-analyse/references/handoff-mappings.md +81 -0
- package/templates/skills/business-analyse/references/html-data-mapping.md +10 -2
- package/templates/skills/business-analyse/references/init-schema-deployment.md +65 -0
- package/templates/skills/business-analyse/references/review-data-mapping.md +363 -0
- package/templates/skills/business-analyse/references/spec-auto-inference.md +57 -0
- package/templates/skills/business-analyse/references/ui-dashboard-spec.md +85 -0
- package/templates/skills/business-analyse/references/ui-resource-cards.md +110 -0
- package/templates/skills/business-analyse/references/validate-incremental-html.md +55 -0
- package/templates/skills/business-analyse/steps/step-00-init.md +35 -68
- package/templates/skills/business-analyse/steps/step-01-cadrage.md +5 -194
- package/templates/skills/business-analyse/steps/step-03a-data.md +6 -49
- package/templates/skills/business-analyse/steps/step-03b-ui.md +12 -178
- package/templates/skills/business-analyse/steps/step-03d-validate.md +3 -48
- package/templates/skills/business-analyse/steps/step-04-consolidation.md +9 -104
- package/templates/skills/business-analyse/steps/step-05a-handoff.md +25 -441
- package/templates/skills/business-analyse/steps/step-05b-deploy.md +19 -187
- package/templates/skills/business-analyse/steps/step-06-review.md +277 -0
- package/templates/skills/cc-agent/references/agent-behavior-patterns.md +95 -0
- package/templates/skills/cc-agent/steps/step-02-generate.md +5 -78
- package/templates/skills/check-version/SKILL.md +7 -0
- package/templates/skills/controller/references/controller-code-templates.md +159 -0
- package/templates/skills/controller/references/permission-sync-templates.md +152 -0
- package/templates/skills/controller/steps/step-03-generate.md +6 -158
- package/templates/skills/controller/steps/step-04-perms.md +5 -144
- package/templates/skills/debug/SKILL.md +7 -0
- package/templates/skills/explore/SKILL.md +6 -0
- package/templates/skills/feature-full/SKILL.md +39 -142
- package/templates/skills/feature-full/steps/step-01-implementation.md +120 -0
- package/templates/skills/gitflow/references/init-config-template.md +135 -0
- package/templates/skills/gitflow/references/init-name-normalization.md +103 -0
- package/templates/skills/gitflow/references/plan-template.md +69 -0
- package/templates/skills/gitflow/references/start-efcore-preflight.md +70 -0
- package/templates/skills/gitflow/references/start-local-config.md +110 -0
- package/templates/skills/gitflow/steps/step-init.md +18 -289
- package/templates/skills/gitflow/steps/step-plan.md +6 -63
- package/templates/skills/gitflow/steps/step-start.md +16 -126
- package/templates/skills/mcp/SKILL.md +9 -213
- package/templates/skills/mcp/steps/step-01-healthcheck.md +108 -0
- package/templates/skills/mcp/steps/step-02-tools.md +73 -0
- package/templates/skills/notification/SKILL.md +7 -0
- package/templates/skills/quick-search/SKILL.md +5 -0
- package/templates/skills/ralph-loop/SKILL.md +99 -381
- package/templates/skills/ralph-loop/references/category-rules.md +259 -0
- package/templates/skills/ralph-loop/references/compact-loop.md +182 -0
- package/templates/skills/ralph-loop/references/task-transform-legacy.md +259 -0
- package/templates/skills/ralph-loop/references/team-orchestration.md +189 -0
- package/templates/skills/ralph-loop/steps/step-00-init.md +111 -383
- package/templates/skills/ralph-loop/steps/step-01-task.md +79 -896
- package/templates/skills/ralph-loop/steps/step-02-execute.md +68 -680
- package/templates/skills/ralph-loop/steps/step-03-commit.md +47 -277
- package/templates/skills/ralph-loop/steps/step-04-check.md +124 -607
- package/templates/skills/ralph-loop/steps/step-05-report.md +68 -367
- package/templates/skills/refactor/SKILL.md +12 -176
- package/templates/skills/refactor/steps/step-01-discover.md +60 -0
- package/templates/skills/refactor/steps/step-02-execute.md +67 -0
- package/templates/skills/review-code/SKILL.md +19 -257
- package/templates/skills/review-code/steps/step-01-smartstack.md +96 -0
- package/templates/skills/review-code/steps/step-02-detailed-review.md +80 -0
- package/templates/skills/review-code/steps/step-03-react.md +44 -0
- package/templates/skills/ui-components/SKILL.md +7 -0
- package/templates/skills/utils/SKILL.md +6 -0
- package/templates/skills/validate/SKILL.md +6 -0
- package/templates/skills/validate-feature/SKILL.md +8 -0
- package/templates/skills/workflow/SKILL.md +40 -118
- package/templates/skills/workflow/steps/step-01-implementation.md +84 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: step-05-report
|
|
3
|
-
description: Generate final report from prd.json
|
|
3
|
+
description: Generate final report from prd.json structured data (v3 unified or v2 legacy)
|
|
4
4
|
next_step: null
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -8,455 +8,156 @@ next_step: null
|
|
|
8
8
|
|
|
9
9
|
## YOUR TASK:
|
|
10
10
|
|
|
11
|
-
Generate a comprehensive feature report using structured data from prd.json
|
|
11
|
+
Generate a comprehensive feature report using structured data from prd.json.
|
|
12
12
|
|
|
13
13
|
---
|
|
14
14
|
|
|
15
|
-
##
|
|
16
|
-
|
|
17
|
-
### 1. Load Structured Data from prd.json
|
|
18
|
-
|
|
19
|
-
**Read all data from the single source of truth:**
|
|
15
|
+
## 1. Load Data
|
|
20
16
|
|
|
21
17
|
```javascript
|
|
22
18
|
const prd = readJSON('.ralph/prd.json');
|
|
23
|
-
|
|
24
19
|
const stats = {
|
|
25
|
-
feature: prd.feature,
|
|
26
|
-
status: prd.status,
|
|
27
|
-
schema: prd.$version,
|
|
28
|
-
started: prd.created,
|
|
29
|
-
completed: new Date().toISOString(),
|
|
20
|
+
feature: prd.feature, status: prd.status,
|
|
30
21
|
iterations_used: prd.config.current_iteration - 1,
|
|
31
|
-
max_iterations: prd.config.max_iterations,
|
|
32
22
|
tasks: {
|
|
33
23
|
total: prd.tasks.length,
|
|
34
24
|
completed: prd.tasks.filter(t => t.status === 'completed').length,
|
|
35
25
|
failed: prd.tasks.filter(t => t.status === 'failed').length,
|
|
36
|
-
blocked: prd.tasks.filter(t => t.status === 'blocked').length
|
|
37
|
-
|
|
38
|
-
pending: prd.tasks.filter(t => t.status === 'pending').length
|
|
39
|
-
},
|
|
40
|
-
source: prd.source ? prd.source.type : 'direct',
|
|
41
|
-
branch: prd.metadata.branch
|
|
26
|
+
blocked: prd.tasks.filter(t => t.status === 'blocked').length
|
|
27
|
+
}
|
|
42
28
|
};
|
|
43
29
|
|
|
44
30
|
// Aggregate files from all tasks
|
|
45
|
-
const
|
|
46
|
-
const
|
|
47
|
-
for (const task of prd.tasks) {
|
|
48
|
-
if (task.files_changed) {
|
|
49
|
-
allFilesCreated.push(...task.files_changed.created);
|
|
50
|
-
allFilesModified.push(...task.files_changed.modified);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
// Deduplicate
|
|
55
|
-
const filesCreated = [...new Set(allFilesCreated)];
|
|
56
|
-
const filesModified = [...new Set(allFilesModified)];
|
|
57
|
-
|
|
58
|
-
// Calculate total duration from history
|
|
31
|
+
const filesCreated = [...new Set(prd.tasks.flatMap(t => t.files_changed?.created || []))];
|
|
32
|
+
const filesModified = [...new Set(prd.tasks.flatMap(t => t.files_changed?.modified || []))];
|
|
59
33
|
const totalDuration = prd.history.reduce((sum, h) => sum + (h.duration_seconds || 0), 0);
|
|
60
34
|
```
|
|
61
35
|
|
|
62
|
-
### 1b. Multi-Module Aggregation
|
|
63
|
-
|
|
64
|
-
**Check for multi-module context:**
|
|
36
|
+
### 1b. Multi-Module Aggregation
|
|
65
37
|
|
|
66
38
|
```javascript
|
|
67
39
|
const queuePath = '.ralph/modules-queue.json';
|
|
68
|
-
const hasQueue = fileExists(queuePath);
|
|
69
|
-
|
|
70
40
|
let moduleStats = null;
|
|
71
|
-
|
|
72
|
-
if (hasQueue) {
|
|
41
|
+
if (fileExists(queuePath)) {
|
|
73
42
|
const queue = readJSON(queuePath);
|
|
74
|
-
|
|
75
|
-
moduleStats = {
|
|
76
|
-
totalModules: queue.totalModules,
|
|
77
|
-
completedModules: queue.completedModules,
|
|
78
|
-
modules: []
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
// Aggregate stats from each module's prd file
|
|
43
|
+
moduleStats = { totalModules: queue.totalModules, completedModules: queue.completedModules, modules: [] };
|
|
82
44
|
for (const mod of queue.modules) {
|
|
83
45
|
const modPrd = readJSON(mod.prdFile);
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
total: modTasks.length,
|
|
91
|
-
completed: modTasks.filter(t => t.status === 'completed').length,
|
|
92
|
-
failed: modTasks.filter(t => t.status === 'failed').length,
|
|
93
|
-
blocked: modTasks.filter(t => t.status === 'blocked').length,
|
|
94
|
-
skipped: modTasks.filter(t => t.status === 'skipped').length
|
|
95
|
-
},
|
|
96
|
-
filesCreated: [],
|
|
97
|
-
filesModified: [],
|
|
98
|
-
commits: []
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
for (const task of modTasks) {
|
|
102
|
-
if (task.files_changed) {
|
|
103
|
-
modData.filesCreated.push(...task.files_changed.created);
|
|
104
|
-
modData.filesModified.push(...task.files_changed.modified);
|
|
105
|
-
}
|
|
106
|
-
if (task.commit_hash) {
|
|
107
|
-
modData.commits.push(task.commit_hash);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
modData.filesCreated = [...new Set(modData.filesCreated)];
|
|
112
|
-
modData.filesModified = [...new Set(modData.filesModified)];
|
|
113
|
-
modData.commits = [...new Set(modData.commits)];
|
|
114
|
-
|
|
115
|
-
moduleStats.modules.push(modData);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
// Merge all module files into main aggregation
|
|
119
|
-
for (const mod of moduleStats.modules) {
|
|
120
|
-
allFilesCreated.push(...mod.filesCreated);
|
|
121
|
-
allFilesModified.push(...mod.filesModified);
|
|
46
|
+
moduleStats.modules.push({
|
|
47
|
+
code: mod.code, status: mod.status,
|
|
48
|
+
tasks: { total: modPrd.tasks.length, completed: modPrd.tasks.filter(t => t.status === 'completed').length, failed: modPrd.tasks.filter(t => t.status === 'failed').length },
|
|
49
|
+
filesCreated: [...new Set(modPrd.tasks.flatMap(t => t.files_changed?.created || []))].length,
|
|
50
|
+
commits: [...new Set(modPrd.tasks.filter(t => t.commit_hash).map(t => t.commit_hash))].length
|
|
51
|
+
});
|
|
122
52
|
}
|
|
123
53
|
}
|
|
124
54
|
```
|
|
125
55
|
|
|
126
|
-
### 1c.
|
|
127
|
-
|
|
128
|
-
**CRITICAL: Test metrics MUST be included in the final report.**
|
|
129
|
-
|
|
130
|
-
```bash
|
|
131
|
-
PROJECT_NAME=$(basename $(pwd))
|
|
132
|
-
TEST_PROJECT="tests/${PROJECT_NAME}.Tests.Unit"
|
|
133
|
-
|
|
134
|
-
testMetrics={
|
|
135
|
-
projectExists: false,
|
|
136
|
-
testsExecuted: false,
|
|
137
|
-
lastRunStatus: "unknown",
|
|
138
|
-
totalTests: 0,
|
|
139
|
-
passed: 0,
|
|
140
|
-
failed: 0,
|
|
141
|
-
skipped: 0,
|
|
142
|
-
coverage: 0,
|
|
143
|
-
duration: 0
|
|
144
|
-
};
|
|
145
|
-
|
|
146
|
-
if [ -d "$TEST_PROJECT" ]; then
|
|
147
|
-
testMetrics.projectExists = true;
|
|
148
|
-
|
|
149
|
-
# Extract latest test metrics from progress.txt
|
|
150
|
-
if [ -f ".ralph/progress.txt" ]; then
|
|
151
|
-
# Parse last "Test Metrics" entry
|
|
152
|
-
LAST_METRICS=$(grep -A 3 "\[Test Metrics" .ralph/progress.txt | tail -4)
|
|
153
|
-
|
|
154
|
-
# Extract values using regex
|
|
155
|
-
TOTAL=$(echo "$LAST_METRICS" | grep -oP "Total: \K\d+")
|
|
156
|
-
PASSED=$(echo "$LAST_METRICS" | grep -oP "Passed: \K\d+")
|
|
157
|
-
FAILED=$(echo "$LAST_METRICS" | grep -oP "Failed: \K\d+")
|
|
158
|
-
SKIPPED=$(echo "$LAST_METRICS" | grep -oP "Skipped: \K\d+")
|
|
159
|
-
DURATION=$(echo "$LAST_METRICS" | grep -oP "Duration: \K[\d\.]+")
|
|
160
|
-
|
|
161
|
-
if [ -n "$TOTAL" ]; then
|
|
162
|
-
testMetrics.testsExecuted = true;
|
|
163
|
-
testMetrics.totalTests = $TOTAL;
|
|
164
|
-
testMetrics.passed = $PASSED;
|
|
165
|
-
testMetrics.failed = $FAILED;
|
|
166
|
-
testMetrics.skipped = $SKIPPED;
|
|
167
|
-
testMetrics.duration = $DURATION;
|
|
168
|
-
testMetrics.lastRunStatus = [ $FAILED -eq 0 ] ? "passed" : "failed";
|
|
169
|
-
fi
|
|
170
|
-
fi
|
|
171
|
-
|
|
172
|
-
# If no metrics in progress.txt, run tests now to get final stats
|
|
173
|
-
if [ "$testMetrics.testsExecuted" = false ]; then
|
|
174
|
-
echo "Running final test suite to collect metrics...";
|
|
175
|
-
TEST_OUTPUT=$(dotnet test "$TEST_PROJECT" --no-build --verbosity minimal 2>&1);
|
|
176
|
-
TEST_EXIT_CODE=$?;
|
|
177
|
-
|
|
178
|
-
testMetrics.testsExecuted = true;
|
|
179
|
-
testMetrics.lastRunStatus = [ $TEST_EXIT_CODE -eq 0 ] ? "passed" : "failed";
|
|
180
|
-
|
|
181
|
-
# Parse test output
|
|
182
|
-
testMetrics.totalTests = parseTestCount(TEST_OUTPUT);
|
|
183
|
-
testMetrics.passed = parsePassedCount(TEST_OUTPUT);
|
|
184
|
-
testMetrics.failed = parseFailedCount(TEST_OUTPUT);
|
|
185
|
-
testMetrics.skipped = parseSkippedCount(TEST_OUTPUT);
|
|
186
|
-
testMetrics.duration = parseDuration(TEST_OUTPUT);
|
|
187
|
-
fi
|
|
188
|
-
|
|
189
|
-
# Get coverage using MCP
|
|
190
|
-
const coverageResult = mcp__smartstack__analyze_test_coverage({
|
|
191
|
-
project_path: process.cwd()
|
|
192
|
-
});
|
|
193
|
-
|
|
194
|
-
if (coverageResult && coverageResult.percentage) {
|
|
195
|
-
testMetrics.coverage = coverageResult.percentage;
|
|
196
|
-
}
|
|
197
|
-
fi
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
**Store metrics for report generation:**
|
|
56
|
+
### 1c. Team Results Aggregation
|
|
201
57
|
|
|
202
58
|
```javascript
|
|
203
|
-
|
|
59
|
+
// If Agent Teams were used, results are already in per-module PRDs
|
|
60
|
+
// Aggregate from moduleStats (same as 1b)
|
|
204
61
|
```
|
|
205
62
|
|
|
206
|
-
###
|
|
207
|
-
|
|
208
|
-
**Parse from verbose logs:**
|
|
63
|
+
### 1d. Test Metrics
|
|
209
64
|
|
|
210
65
|
```bash
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
**Or extract from task validations:**
|
|
218
|
-
|
|
219
|
-
```javascript
|
|
220
|
-
const validationStats = {
|
|
221
|
-
passed: prd.tasks.filter(t => t.validation === 'passed').length,
|
|
222
|
-
failed: prd.tasks.filter(t => t.validation && t.validation.startsWith('failed')).length,
|
|
223
|
-
skipped: prd.tasks.filter(t => t.validation === null).length
|
|
224
|
-
};
|
|
66
|
+
TEST_PROJECT="tests/$(basename $(pwd)).Tests.Unit"
|
|
67
|
+
if [ -d "$TEST_PROJECT" ]; then
|
|
68
|
+
dotnet test "$TEST_PROJECT" --no-build --verbosity minimal
|
|
69
|
+
# Parse total/passed/failed/skipped from output
|
|
70
|
+
fi
|
|
225
71
|
```
|
|
226
72
|
|
|
227
|
-
|
|
73
|
+
## 2. Generate Report
|
|
228
74
|
|
|
229
|
-
|
|
75
|
+
Write to `.ralph/reports/{feature-slug}.md`:
|
|
230
76
|
|
|
231
77
|
```markdown
|
|
232
78
|
# Feature Report: {feature}
|
|
233
79
|
|
|
234
80
|
## Summary
|
|
235
|
-
|
|
236
81
|
| Field | Value |
|
|
237
82
|
|-------|-------|
|
|
238
|
-
|
|
|
239
|
-
|
|
|
240
|
-
|
|
|
241
|
-
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
| # | Task | Category | Status | Iteration | Duration | Commit |
|
|
249
|
-
|---|------|----------|--------|-----------|----------|--------|
|
|
250
|
-
{for each task in prd.tasks:}
|
|
251
|
-
| {id} | {description} | {category} | {status_emoji} | {iteration || '-'} | {duration}s | {commit_hash || '-'} |
|
|
252
|
-
{end for}
|
|
253
|
-
|
|
254
|
-
**Summary: {completed}/{total} completed, {failed} failed, {blocked} blocked, {skipped} skipped**
|
|
83
|
+
| Status | {status} |
|
|
84
|
+
| Iterations | {iterations_used} / {max} |
|
|
85
|
+
| Branch | {branch} |
|
|
86
|
+
| Duration | {totalDuration}s ({min} min) |
|
|
87
|
+
|
|
88
|
+
## Tasks
|
|
89
|
+
| # | Task | Category | Status | Commit |
|
|
90
|
+
|---|------|----------|--------|--------|
|
|
91
|
+
{for each task:}
|
|
92
|
+
| {id} | {description} | {category} | {status_emoji} | {commit_hash} |
|
|
255
93
|
|
|
256
|
-
{
|
|
94
|
+
**{completed}/{total} completed, {failed} failed, {blocked} blocked**
|
|
257
95
|
|
|
258
96
|
{if moduleStats:}
|
|
259
|
-
##
|
|
97
|
+
## Modules
|
|
98
|
+
| Module | Status | Tasks | Completed | Failed | Files | Commits |
|
|
99
|
+
|--------|--------|-------|-----------|--------|-------|---------|
|
|
100
|
+
{for each mod:}
|
|
101
|
+
| {code} | {status} | {total} | {completed} | {failed} | {filesCreated} | {commits} |
|
|
260
102
|
|
|
261
|
-
|
|
262
|
-
|--------|--------|-------|-----------|--------|---------------|----------------|---------|
|
|
263
|
-
{for each mod in moduleStats.modules:}
|
|
264
|
-
| {mod.code} | {mod.status} | {mod.tasks.total} | {mod.tasks.completed} | {mod.tasks.failed} | {mod.filesCreated.length} | {mod.filesModified.length} | {mod.commits.length} |
|
|
265
|
-
{end for}
|
|
266
|
-
|
|
267
|
-
**Modules: {moduleStats.completedModules}/{moduleStats.totalModules} completed**
|
|
103
|
+
**{completedModules}/{totalModules} modules completed**
|
|
268
104
|
{end if}
|
|
269
105
|
|
|
270
106
|
## Test Metrics
|
|
271
|
-
|
|
272
|
-
{if testMetrics.projectExists:}
|
|
273
107
|
| Metric | Value |
|
|
274
108
|
|--------|-------|
|
|
275
|
-
|
|
|
276
|
-
|
|
|
277
|
-
|
|
|
278
|
-
|
|
|
279
|
-
| **Passed** | ✅ {testMetrics.passed} |
|
|
280
|
-
| **Failed** | ❌ {testMetrics.failed} |
|
|
281
|
-
| **Skipped** | ⏭️ {testMetrics.skipped} |
|
|
282
|
-
| **Coverage** | {testMetrics.coverage}% {testMetrics.coverage >= 80 ? '✅' : testMetrics.coverage >= 60 ? '⚠️' : '❌'} |
|
|
283
|
-
| **Duration** | {testMetrics.duration}s |
|
|
284
|
-
|
|
285
|
-
{if testMetrics.failed > 0:}
|
|
286
|
-
⚠️ **WARNING:** Some tests are failing. The module is NOT production-ready.
|
|
287
|
-
{end if}
|
|
288
|
-
|
|
289
|
-
{if testMetrics.coverage < 80:}
|
|
290
|
-
⚠️ **WARNING:** Test coverage is below 80% minimum. Consider adding more tests.
|
|
291
|
-
{end if}
|
|
292
|
-
|
|
293
|
-
{else:}
|
|
294
|
-
❌ **No test project found.** Tests were not created for this module.
|
|
295
|
-
|
|
296
|
-
**RECOMMENDATION:** Create a test project and add comprehensive tests before deploying to production.
|
|
297
|
-
|
|
298
|
-
Suggested command:
|
|
299
|
-
```bash
|
|
300
|
-
dotnet new xunit -n {PROJECT_NAME}.Tests.Unit -o tests/{PROJECT_NAME}.Tests.Unit
|
|
301
|
-
dotnet sln add tests/{PROJECT_NAME}.Tests.Unit
|
|
302
|
-
```
|
|
303
|
-
{end if}
|
|
109
|
+
| Tests Executed | {yes/no} |
|
|
110
|
+
| Status | {passed/failed} |
|
|
111
|
+
| Total | {n} | Passed | {n} | Failed | {n} |
|
|
112
|
+
| Coverage | {n}% |
|
|
304
113
|
|
|
305
114
|
## Failed Tasks
|
|
115
|
+
{table of failed tasks with error messages, or "None"}
|
|
306
116
|
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
{for each failed task:}
|
|
311
|
-
| {id} | {description} | {error} |
|
|
312
|
-
{end for}
|
|
313
|
-
{else:}
|
|
314
|
-
No failed tasks.
|
|
315
|
-
{end if}
|
|
316
|
-
|
|
317
|
-
## Blocked Tasks
|
|
318
|
-
|
|
319
|
-
{if any blocked tasks:}
|
|
320
|
-
| # | Task | Blocked By | Error |
|
|
321
|
-
|---|------|------------|-------|
|
|
322
|
-
{for each blocked task:}
|
|
323
|
-
| {id} | {description} | Tasks {dependencies} | {error} |
|
|
324
|
-
{end for}
|
|
325
|
-
{else:}
|
|
326
|
-
No blocked tasks.
|
|
327
|
-
{end if}
|
|
328
|
-
|
|
329
|
-
## Iteration History
|
|
330
|
-
|
|
331
|
-
{for each entry in prd.history:}
|
|
332
|
-
### Iteration {iteration} — Task [{task_id}]
|
|
333
|
-
- **Action**: {action}
|
|
334
|
-
- **Timestamp**: {timestamp}
|
|
335
|
-
- **Commit**: {commit_hash}
|
|
336
|
-
- **Duration**: {duration_seconds}s
|
|
337
|
-
- **Notes**: {notes}
|
|
338
|
-
|
|
339
|
-
{end for}
|
|
340
|
-
|
|
341
|
-
## MCP Validation Results
|
|
117
|
+
## Files
|
|
118
|
+
- Created: {filesCreated.length}
|
|
119
|
+
- Modified: {filesModified.length}
|
|
342
120
|
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
{for each task:}
|
|
346
|
-
| [{id}] {description} | {category} | {validation || 'N/A'} |
|
|
347
|
-
{end for}
|
|
348
|
-
|
|
349
|
-
## Files Created ({filesCreated.length})
|
|
350
|
-
|
|
351
|
-
{if filesCreated.length > 0:}
|
|
352
|
-
{for each file:}
|
|
353
|
-
- `{file}`
|
|
354
|
-
{end for}
|
|
355
|
-
{else:}
|
|
356
|
-
- (none)
|
|
357
|
-
{end if}
|
|
358
|
-
|
|
359
|
-
## Files Modified ({filesModified.length})
|
|
360
|
-
|
|
361
|
-
{if filesModified.length > 0:}
|
|
362
|
-
{for each file:}
|
|
363
|
-
- `{file}`
|
|
364
|
-
{end for}
|
|
365
|
-
{else:}
|
|
366
|
-
- (none)
|
|
367
|
-
{end if}
|
|
368
|
-
|
|
369
|
-
## Git Commits
|
|
370
|
-
|
|
371
|
-
{for each unique commit_hash in tasks:}
|
|
372
|
-
`{commit_hash}` {commit message from task description}
|
|
373
|
-
{end for}
|
|
374
|
-
|
|
375
|
-
## Metadata
|
|
376
|
-
|
|
377
|
-
| Field | Value |
|
|
378
|
-
|-------|-------|
|
|
379
|
-
| CLI Version | {prd.metadata.cli_version} |
|
|
380
|
-
| Branch | {prd.metadata.branch} |
|
|
381
|
-
| Project | {prd.metadata.project_path} |
|
|
382
|
-
| MCP SmartStack | {prd.metadata.mcp_servers.smartstack ? '✅' : '❌'} |
|
|
383
|
-
| MCP Context7 | {prd.metadata.mcp_servers.context7 ? '✅' : '❌'} |
|
|
384
|
-
| Total Duration | {totalDuration}s ({Math.round(totalDuration/60)} min) |
|
|
121
|
+
## Commits
|
|
122
|
+
{unique commits list}
|
|
385
123
|
|
|
386
124
|
---
|
|
387
|
-
*Auto-generated by Ralph Loop
|
|
125
|
+
*Auto-generated by Ralph Loop — SmartStack CLI*
|
|
388
126
|
```
|
|
389
127
|
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
**Set final status (if not already set by step-04):**
|
|
128
|
+
## 3. Finalize
|
|
393
129
|
|
|
394
130
|
```javascript
|
|
395
131
|
prd.updated_at = new Date().toISOString();
|
|
396
132
|
writeJSON('.ralph/prd.json', prd);
|
|
397
133
|
```
|
|
398
134
|
|
|
399
|
-
|
|
135
|
+
## 4. Display Summary
|
|
400
136
|
|
|
401
137
|
```
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
║ Tasks: {completed}/{total} completed ║
|
|
409
|
-
║ {failed} failed, {blocked} blocked ║
|
|
410
|
-
║ {moduleStats ? "Modules: " + moduleStats.completedModules + "/" + moduleStats.totalModules + " completed" : ""} ║
|
|
411
|
-
╠══════════════════════════════════════════════════════════════════╣
|
|
412
|
-
║ Files Created: {filesCreated.length} ║
|
|
413
|
-
║ Files Modified: {filesModified.length} ║
|
|
414
|
-
║ Commits: {unique_commits.length} ║
|
|
415
|
-
║ Duration: {totalDuration}s ({minutes} min) ║
|
|
416
|
-
╠══════════════════════════════════════════════════════════════════╣
|
|
417
|
-
║ Report saved to: ║
|
|
418
|
-
║ .ralph/reports/{feature-slug}.md ║
|
|
419
|
-
╚══════════════════════════════════════════════════════════════════╝
|
|
138
|
+
RALPH LOOP COMPLETE
|
|
139
|
+
Feature: {feature} | Status: {status}
|
|
140
|
+
Iterations: {n} | Tasks: {completed}/{total}
|
|
141
|
+
{moduleStats ? `Modules: ${completedModules}/${totalModules}` : ""}
|
|
142
|
+
Files: {created} created, {modified} modified
|
|
143
|
+
Report: .ralph/reports/{slug}.md
|
|
420
144
|
```
|
|
421
145
|
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
**If prd.status === 'completed' and not already output:**
|
|
146
|
+
## 5. Completion Promise (if applicable)
|
|
425
147
|
|
|
426
148
|
```
|
|
427
149
|
<promise>{completion_promise}</promise>
|
|
428
150
|
```
|
|
429
151
|
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
## CLEANUP SUGGESTIONS:
|
|
433
|
-
|
|
434
|
-
**Suggest to user:**
|
|
152
|
+
## 6. Next Steps
|
|
435
153
|
|
|
436
154
|
```
|
|
437
|
-
|
|
438
|
-
1. Review report: .ralph/reports/{feature-slug}.md
|
|
155
|
+
1. Review report: .ralph/reports/{slug}.md
|
|
439
156
|
2. Run full test suite: dotnet test
|
|
440
157
|
3. Create PR: /gitflow pr
|
|
441
|
-
4. Clean up
|
|
158
|
+
4. Clean up: rm -rf .ralph/ (optional)
|
|
442
159
|
```
|
|
443
160
|
|
|
444
161
|
---
|
|
445
162
|
|
|
446
|
-
## SUCCESS CRITERIA:
|
|
447
|
-
|
|
448
|
-
- Report generated in `.ralph/reports/` with ALL structured data from prd.json
|
|
449
|
-
- Task progress table with categories, status, iterations, and commits
|
|
450
|
-
- Failed/blocked tasks documented with error messages
|
|
451
|
-
- Iteration history from `history[]` included
|
|
452
|
-
- File lists from task-level tracking (not git log)
|
|
453
|
-
- Metadata section with execution context
|
|
454
|
-
- Duration calculated from history entries
|
|
455
|
-
- Final summary displayed
|
|
456
|
-
- prd.json `status` and `updated_at` finalized
|
|
457
|
-
- **Multi-module:** Per-module statistics table included (if modules-queue.json exists)
|
|
458
|
-
- **Multi-module:** Cross-module file and commit aggregation
|
|
459
|
-
|
|
460
|
-
## COMPLETION:
|
|
461
|
-
|
|
462
163
|
Ralph loop complete. No more steps.
|