@atlashub/smartstack-cli 3.8.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.
Files changed (120) hide show
  1. package/dist/index.js +365 -2
  2. package/dist/index.js.map +1 -1
  3. package/package.json +2 -1
  4. package/templates/agents/action.md +1 -0
  5. package/templates/agents/ba-writer.md +33 -0
  6. package/templates/agents/explore-codebase.md +1 -0
  7. package/templates/agents/explore-docs.md +1 -0
  8. package/templates/agents/fix-grammar.md +1 -0
  9. package/templates/agents/snipper.md +1 -0
  10. package/templates/skills/admin/SKILL.md +6 -0
  11. package/templates/skills/ai-prompt/SKILL.md +32 -136
  12. package/templates/skills/ai-prompt/steps/step-01-implementation.md +122 -0
  13. package/templates/skills/apex/SKILL.md +120 -0
  14. package/templates/skills/apex/_shared.md +86 -0
  15. package/templates/skills/apex/references/agent-teams-protocol.md +164 -0
  16. package/templates/skills/apex/references/smartstack-layers.md +173 -0
  17. package/templates/skills/apex/steps/step-00-init.md +156 -0
  18. package/templates/skills/apex/steps/step-01-analyze.md +169 -0
  19. package/templates/skills/apex/steps/step-02-plan.md +160 -0
  20. package/templates/skills/apex/steps/step-03-execute.md +166 -0
  21. package/templates/skills/apex/steps/step-04-validate.md +138 -0
  22. package/templates/skills/apex/steps/step-05-examine.md +124 -0
  23. package/templates/skills/apex/steps/step-06-resolve.md +105 -0
  24. package/templates/skills/apex/steps/step-07-tests.md +130 -0
  25. package/templates/skills/apex/steps/step-08-run-tests.md +115 -0
  26. package/templates/skills/application/SKILL.md +10 -0
  27. package/templates/skills/application/references/backend-controller-hierarchy.md +58 -0
  28. package/templates/skills/application/references/backend-entity-seeding.md +72 -0
  29. package/templates/skills/application/references/backend-verification.md +88 -0
  30. package/templates/skills/application/references/frontend-verification.md +111 -0
  31. package/templates/skills/application/references/nav-fallback-procedure.md +200 -0
  32. package/templates/skills/application/references/provider-template.md +134 -0
  33. package/templates/skills/application/references/test-frontend.md +73 -0
  34. package/templates/skills/application/references/test-prerequisites.md +72 -0
  35. package/templates/skills/application/steps/step-01-navigation.md +7 -198
  36. package/templates/skills/application/steps/step-03b-provider.md +4 -128
  37. package/templates/skills/application/steps/step-04-backend.md +20 -350
  38. package/templates/skills/application/steps/step-05-frontend.md +12 -101
  39. package/templates/skills/application/steps/step-07-tests.md +12 -132
  40. package/templates/skills/business-analyse/SKILL.md +11 -2
  41. package/templates/skills/business-analyse/html/ba-interactive.html +176 -14
  42. package/templates/skills/business-analyse/html/src/scripts/01-data-init.js +1 -0
  43. package/templates/skills/business-analyse/html/src/scripts/05-render-specs.js +16 -4
  44. package/templates/skills/business-analyse/html/src/scripts/06-render-consolidation.js +7 -2
  45. package/templates/skills/business-analyse/html/src/scripts/09-export.js +103 -0
  46. package/templates/skills/business-analyse/html/src/scripts/10-comments.js +12 -6
  47. package/templates/skills/business-analyse/html/src/scripts/11-review-panel.js +24 -2
  48. package/templates/skills/business-analyse/html/src/styles/08-review-panel.css +12 -0
  49. package/templates/skills/business-analyse/html/src/template.html +1 -0
  50. package/templates/skills/business-analyse/references/cadrage-structure-cards.md +78 -0
  51. package/templates/skills/business-analyse/references/cadrage-vibe-coding.md +97 -0
  52. package/templates/skills/business-analyse/references/consolidation-structural-checks.md +92 -0
  53. package/templates/skills/business-analyse/references/deploy-data-build.md +121 -0
  54. package/templates/skills/business-analyse/references/deploy-modes.md +49 -0
  55. package/templates/skills/business-analyse/references/handoff-file-templates.md +119 -0
  56. package/templates/skills/business-analyse/references/handoff-mappings.md +81 -0
  57. package/templates/skills/business-analyse/references/html-data-mapping.md +10 -2
  58. package/templates/skills/business-analyse/references/init-schema-deployment.md +65 -0
  59. package/templates/skills/business-analyse/references/review-data-mapping.md +363 -0
  60. package/templates/skills/business-analyse/references/spec-auto-inference.md +57 -0
  61. package/templates/skills/business-analyse/references/ui-dashboard-spec.md +85 -0
  62. package/templates/skills/business-analyse/references/ui-resource-cards.md +110 -0
  63. package/templates/skills/business-analyse/references/validate-incremental-html.md +55 -0
  64. package/templates/skills/business-analyse/steps/step-00-init.md +35 -68
  65. package/templates/skills/business-analyse/steps/step-01-cadrage.md +5 -194
  66. package/templates/skills/business-analyse/steps/step-03a-data.md +6 -49
  67. package/templates/skills/business-analyse/steps/step-03b-ui.md +12 -178
  68. package/templates/skills/business-analyse/steps/step-03d-validate.md +3 -48
  69. package/templates/skills/business-analyse/steps/step-04-consolidation.md +9 -104
  70. package/templates/skills/business-analyse/steps/step-05a-handoff.md +25 -441
  71. package/templates/skills/business-analyse/steps/step-05b-deploy.md +19 -187
  72. package/templates/skills/business-analyse/steps/step-06-review.md +277 -0
  73. package/templates/skills/cc-agent/references/agent-behavior-patterns.md +95 -0
  74. package/templates/skills/cc-agent/steps/step-02-generate.md +5 -78
  75. package/templates/skills/check-version/SKILL.md +7 -0
  76. package/templates/skills/controller/references/controller-code-templates.md +159 -0
  77. package/templates/skills/controller/references/permission-sync-templates.md +152 -0
  78. package/templates/skills/controller/steps/step-03-generate.md +6 -158
  79. package/templates/skills/controller/steps/step-04-perms.md +5 -144
  80. package/templates/skills/debug/SKILL.md +7 -0
  81. package/templates/skills/explore/SKILL.md +6 -0
  82. package/templates/skills/feature-full/SKILL.md +39 -142
  83. package/templates/skills/feature-full/steps/step-01-implementation.md +120 -0
  84. package/templates/skills/gitflow/references/init-config-template.md +135 -0
  85. package/templates/skills/gitflow/references/init-name-normalization.md +103 -0
  86. package/templates/skills/gitflow/references/plan-template.md +69 -0
  87. package/templates/skills/gitflow/references/start-efcore-preflight.md +70 -0
  88. package/templates/skills/gitflow/references/start-local-config.md +110 -0
  89. package/templates/skills/gitflow/steps/step-init.md +18 -289
  90. package/templates/skills/gitflow/steps/step-plan.md +6 -63
  91. package/templates/skills/gitflow/steps/step-start.md +16 -126
  92. package/templates/skills/mcp/SKILL.md +9 -213
  93. package/templates/skills/mcp/steps/step-01-healthcheck.md +108 -0
  94. package/templates/skills/mcp/steps/step-02-tools.md +73 -0
  95. package/templates/skills/notification/SKILL.md +7 -0
  96. package/templates/skills/quick-search/SKILL.md +5 -0
  97. package/templates/skills/ralph-loop/SKILL.md +99 -381
  98. package/templates/skills/ralph-loop/references/category-rules.md +259 -0
  99. package/templates/skills/ralph-loop/references/compact-loop.md +182 -0
  100. package/templates/skills/ralph-loop/references/task-transform-legacy.md +259 -0
  101. package/templates/skills/ralph-loop/references/team-orchestration.md +189 -0
  102. package/templates/skills/ralph-loop/steps/step-00-init.md +111 -383
  103. package/templates/skills/ralph-loop/steps/step-01-task.md +79 -896
  104. package/templates/skills/ralph-loop/steps/step-02-execute.md +68 -680
  105. package/templates/skills/ralph-loop/steps/step-03-commit.md +47 -277
  106. package/templates/skills/ralph-loop/steps/step-04-check.md +124 -607
  107. package/templates/skills/ralph-loop/steps/step-05-report.md +68 -367
  108. package/templates/skills/refactor/SKILL.md +12 -176
  109. package/templates/skills/refactor/steps/step-01-discover.md +60 -0
  110. package/templates/skills/refactor/steps/step-02-execute.md +67 -0
  111. package/templates/skills/review-code/SKILL.md +19 -257
  112. package/templates/skills/review-code/steps/step-01-smartstack.md +96 -0
  113. package/templates/skills/review-code/steps/step-02-detailed-review.md +80 -0
  114. package/templates/skills/review-code/steps/step-03-react.md +44 -0
  115. package/templates/skills/ui-components/SKILL.md +7 -0
  116. package/templates/skills/utils/SKILL.md +6 -0
  117. package/templates/skills/validate/SKILL.md +6 -0
  118. package/templates/skills/validate-feature/SKILL.md +8 -0
  119. package/templates/skills/workflow/SKILL.md +40 -118
  120. 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 v2 structured data
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 v2 (history, task metadata, file tracking).
11
+ Generate a comprehensive feature report using structured data from prd.json.
12
12
 
13
13
  ---
14
14
 
15
- ## EXECUTION SEQUENCE:
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
- skipped: prd.tasks.filter(t => t.status === 'skipped').length,
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 allFilesCreated = [];
46
- const allFilesModified = [];
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 (if modules-queue.json exists)
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
- const modTasks = modPrd.tasks || [];
85
-
86
- const modData = {
87
- code: mod.code,
88
- status: mod.status,
89
- tasks: {
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. Extract Test Metrics (from progress.txt and test execution)
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
- stats.tests = testMetrics;
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
- ### 2. Collect MCP Usage (from logs if available)
207
-
208
- **Parse from verbose logs:**
63
+ ### 1d. Test Metrics
209
64
 
210
65
  ```bash
211
- # Count MCP calls from log files
212
- MCP_CALLS=$(grep -c "\[MCP\]" .ralph/logs/*.log 2>/dev/null || echo "0")
213
- SMARTSTACK_CALLS=$(grep -c "mcp__smartstack" .ralph/logs/*.log 2>/dev/null || echo "0")
214
- CONTEXT7_CALLS=$(grep -c "mcp__context7" .ralph/logs/*.log 2>/dev/null || echo "0")
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
- ### 3. Generate Report File
73
+ ## 2. Generate Report
228
74
 
229
- **Write to `.ralph/reports/{feature-slug}.md`:**
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
- | **Status** | {status} |
239
- | **Started** | {started} |
240
- | **Completed** | {completed} |
241
- | **Iterations** | {iterations_used} / {max_iterations} |
242
- | **Branch** | {branch} |
243
- | **Source** | {source} |
244
- | **Schema** | {schema} |
245
-
246
- ## Task Progress
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
- {status_emoji mapping: completed=✅, failed=❌, blocked=🚫, skipped=⏭️, pending=⏳}
94
+ **{completed}/{total} completed, {failed} failed, {blocked} blocked**
257
95
 
258
96
  {if moduleStats:}
259
- ## Module Progress
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
- | Module | Status | Tasks | Completed | Failed | Files Created | Files Modified | Commits |
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
- | **Test Project** | ✅ `{TEST_PROJECT}` |
276
- | **Tests Executed** | {testMetrics.testsExecuted ? '✅ Yes' : '❌ No'} |
277
- | **Last Run Status** | {testMetrics.lastRunStatus === 'passed' ? '✅ PASSED' : testMetrics.lastRunStatus === 'failed' ? '❌ FAILED' : '⚠️ UNKNOWN'} |
278
- | **Total Tests** | {testMetrics.totalTests} |
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
- {if any failed tasks:}
308
- | # | Task | Error |
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
- | Task | Category | Validation |
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 v2 — SmartStack CLI*
125
+ *Auto-generated by Ralph Loop — SmartStack CLI*
388
126
  ```
389
127
 
390
- ### 4. Finalize prd.json
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
- ### 5. Display Final Summary
135
+ ## 4. Display Summary
400
136
 
401
137
  ```
402
- ╔══════════════════════════════════════════════════════════════════╗
403
- ║ RALPH LOOP COMPLETE ║
404
- ╠══════════════════════════════════════════════════════════════════╣
405
- ║ Feature: {feature}
406
- ║ Status: {status}
407
- ║ Iterations: {iterations_used}
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
- ### 6. Output Completion (if applicable)
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
- Next steps:
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 Ralph files: rm -rf .ralph/ (optional)
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.