speccrew 0.7.43 → 0.7.45
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.
|
@@ -32,6 +32,15 @@ tools: Read, Write, Glob, Grep
|
|
|
32
32
|
- API Contract template file does not exist → STOP
|
|
33
33
|
- `node ... update-progress.js` script execution fails → **HARD STOP**: Do NOT manually create or edit JSON progress files. Report the script error and wait for user resolution.
|
|
34
34
|
|
|
35
|
+
### Error Categories
|
|
36
|
+
|
|
37
|
+
| Category | Condition | Recovery |
|
|
38
|
+
|----------|-----------|----------|
|
|
39
|
+
| `DEPENDENCY_MISSING` | Feature Spec document not found or empty | Ensure feature design phase completed for this feature |
|
|
40
|
+
| `DEPENDENCY_MISSING` | API Contract template not found | Verify skill installation integrity |
|
|
41
|
+
| `VALIDATION_ERROR` | Feature Spec missing required API sections | Review and fix feature spec content |
|
|
42
|
+
| `RUNTIME_ERROR` | update-progress.js script execution failed | Check script errors; do NOT manually edit JSON |
|
|
43
|
+
|
|
35
44
|
> **NOTE**: This skill does NOT include user confirmation. Confirmation is handled at the orchestrator/dispatcher level after all features are processed. This enables continuous batch execution.
|
|
36
45
|
|
|
37
46
|
## Step 1: Read Input
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
|
|
45
45
|
<!-- Gateway: Validate Feature Spec exists -->
|
|
46
46
|
<block type="gateway" id="G1" mode="guard" desc="Verify Feature Spec exists"
|
|
47
|
-
test="${feature_spec} != null" fail-action="
|
|
47
|
+
test="${feature_spec} != null" fail-action="goto:E1">
|
|
48
48
|
<field name="message">Feature Spec document not found. Check path: ${iteration_path}/02.feature-design/</field>
|
|
49
49
|
</block>
|
|
50
50
|
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
|
|
57
57
|
<!-- Gateway: Validate template exists -->
|
|
58
58
|
<block type="gateway" id="G2" mode="guard" desc="Verify template exists"
|
|
59
|
-
test="${template_content} != null" fail-action="
|
|
59
|
+
test="${template_content} != null" fail-action="goto:E2">
|
|
60
60
|
<field name="message">API Contract template not found at speccrew-fd-api-contract/templates/API-CONTRACT-TEMPLATE.md</field>
|
|
61
61
|
</block>
|
|
62
62
|
|
|
@@ -172,6 +172,19 @@ ${api_list.error_codes}</field>
|
|
|
172
172
|
|
|
173
173
|
</sequence>
|
|
174
174
|
|
|
175
|
+
<!-- ============================================================
|
|
176
|
+
Error Handling Blocks
|
|
177
|
+
============================================================ -->
|
|
178
|
+
<block type="task" id="E1" action="run-script" desc="Record error for missing Feature Spec">
|
|
179
|
+
<field name="command">node "${workspace_path}/scripts/update-progress.js" update-task --file "${dispatch_progress_path}" --task-id "${feature_id}" --status failed --error "Feature Spec document not found at: ${feature_spec_path}" --error-category "DEPENDENCY_MISSING"</field>
|
|
180
|
+
<field name="on-complete">abort</field>
|
|
181
|
+
</block>
|
|
182
|
+
|
|
183
|
+
<block type="task" id="E2" action="run-script" desc="Record error for missing API Contract template">
|
|
184
|
+
<field name="command">node "${workspace_path}/scripts/update-progress.js" update-task --file "${dispatch_progress_path}" --task-id "${feature_id}" --status failed --error "API Contract template not found at: speccrew-fd-api-contract/templates/API-CONTRACT-TEMPLATE.md" --error-category "DEPENDENCY_MISSING"</field>
|
|
185
|
+
<field name="on-complete">abort</field>
|
|
186
|
+
</block>
|
|
187
|
+
|
|
175
188
|
<!-- ============================================================
|
|
176
189
|
Output Results
|
|
177
190
|
============================================================ -->
|
package/package.json
CHANGED
|
@@ -439,7 +439,11 @@ function cmdInit(args) {
|
|
|
439
439
|
// Read task list from argument or file
|
|
440
440
|
if (args.tasksFile) {
|
|
441
441
|
// Read from file
|
|
442
|
-
|
|
442
|
+
let tasksContent = fs.readFileSync(path.resolve(args.tasksFile), 'utf8');
|
|
443
|
+
// Strip UTF-8 BOM if present
|
|
444
|
+
if (tasksContent.charCodeAt(0) === 0xFEFF) {
|
|
445
|
+
tasksContent = tasksContent.slice(1);
|
|
446
|
+
}
|
|
443
447
|
try {
|
|
444
448
|
tasks = JSON.parse(tasksContent);
|
|
445
449
|
} catch (e) {
|