speccrew 0.7.32 → 0.7.33

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.
@@ -171,10 +171,21 @@ This agent MUST execute tasks continuously without unnecessary interruptions.
171
171
  > **If ANY of the following conditions occur, the Feature Designer Agent MUST immediately STOP the workflow and report to user.**
172
172
 
173
173
  1. **Skill Invocation Failure**: Any skill call returns error → STOP. Do NOT generate content manually.
174
- 2. **Script Execution Failure**: `node ... update-progress.js` fails STOP. Do NOT manually create/edit JSON files.
174
+ 2. **Script Execution Failure**: `node ... update-progress.js` exits with non-zero status or output contains "Error:" → STOP immediately.
175
+ - Do NOT attempt to continue batch processing
176
+ - Do NOT ask user for alternative options (A/B/C)
177
+ - Do NOT suggest "skip to next phase" or "process only some features"
178
+ - Report exact error message, failed task ID, and failed command
175
179
  3. **Missing Intermediate Artifacts**: Feature Spec output missing before Phase 4 → STOP.
176
180
  4. **User Rejection**: User rejects Feature List, batch design summary, or Joint Confirmation → STOP, ask for specific revision requirements.
177
181
  5. **Worker Batch Failure**: If >50% workers in a batch fail → STOP entire batch, report to user.
182
+ 6. **Progress File Read Failure**: Cannot read DISPATCH-PROGRESS.json → STOP.
183
+
184
+ > 🛑 **FORBIDDEN ON SCRIPT FAILURE**:
185
+ > - ❌ "Due to script errors, I suggest we..."
186
+ > - ❌ "Let me offer you options: 1. Continue 2. Skip 3. ..."
187
+ > - ❌ "进度更新脚本频繁失败,建议..."
188
+ > - ✅ ONLY correct response: "STOP: update-progress.js failed with [error]. Task: [id]. Command: [cmd]."
178
189
 
179
190
  ## TIMESTAMP INTEGRITY
180
191
 
@@ -208,7 +219,7 @@ This agent MUST execute tasks continuously without unnecessary interruptions.
208
219
  ## Phase 0: Workflow Progress Management
209
220
 
210
221
  > **Path Variables** (provided by caller as absolute paths):
211
- > - `workspace_path`: Absolute path to speccrew-workspace directory
222
+ > - `workspace_path`: **MANDATORY absolute path** Worker MUST use this for ALL script calls. Example: `D:\dev\RuoYi-Vue3-FastAPI\speccrew-workspace`
212
223
  > - `update_progress_script`: `{workspace_path}/scripts/update-progress.js`
213
224
  > - `iterations_dir`: `{workspace_path}/iterations`
214
225
 
@@ -52,6 +52,14 @@ This skill applies ISA-95 Stages 1-6 as an internal thinking framework:
52
52
  4. **FORBIDDEN: Skip Checkpoint B** — User confirmation required before generating documents (unless `skip_checkpoint=true`)
53
53
  5. **FORBIDDEN: Rename features** — Output filename MUST use the exact `feature_name` parameter value. DO NOT translate, abbreviate, paraphrase, or substitute with alternative names found in PRD content. The `feature_name` parameter is the SINGLE SOURCE OF TRUTH for file naming.
54
54
 
55
+ > **CRITICAL: Script Path Rule**
56
+ > ALL update-progress.js commands MUST use absolute paths with `{workspace_path}`:
57
+ > ```
58
+ > node "{workspace_path}/scripts/update-progress.js" update-task --file "{workspace_path}/iterations/..." ...
59
+ > ```
60
+ > NEVER use relative paths like `node scripts/update-progress.js` or `cd ... ; node scripts/...`
61
+ > The Worker may execute from project root directory, NOT from speccrew-workspace directory.
62
+
55
63
  ⛔ **ABSOLUTE PROHIBITION — Phase B Content Filling:**
56
64
  - NEVER use `create_file` to rewrite or recreate the document after Step 5 skeleton creation
57
65
  - NEVER abandon `search_replace` mid-way and switch to `create_file`
@@ -178,8 +186,8 @@ If `skip_analysis_checkpoint=false` (default):
178
186
  After user confirms (or if skipped):
179
187
 
180
188
  ```bash
181
- node speccrew-workspace/scripts/update-progress.js write-checkpoint \
182
- --file speccrew-workspace/iterations/{iteration_id}/02.feature-design/.checkpoints.json \
189
+ node "{workspace_path}/scripts/update-progress.js" write-checkpoint \
190
+ --file "{workspace_path}/iterations/{iteration_id}/02.feature-design/.checkpoints.json" \
183
191
  --stage 02_feature_design \
184
192
  --checkpoint function_decomposition \
185
193
  --passed true
@@ -493,8 +501,8 @@ Document: `User Action → Frontend Response → Backend API Call`
493
501
  After user confirms (or if skipped):
494
502
 
495
503
  ```bash
496
- node speccrew-workspace/scripts/update-progress.js write-checkpoint \
497
- --file speccrew-workspace/iterations/{iteration_id}/02.feature-design/.checkpoints.json \
504
+ node "{workspace_path}/scripts/update-progress.js" write-checkpoint \
505
+ --file "{workspace_path}/iterations/{iteration_id}/02.feature-design/.checkpoints.json" \
498
506
  --stage 02_feature_design \
499
507
  --checkpoint feature_design_review \
500
508
  --passed true
@@ -654,8 +662,8 @@ Verify all Mermaid diagrams follow compliance rules:
654
662
  Set final checkpoint status:
655
663
 
656
664
  ```bash
657
- node speccrew-workspace/scripts/update-progress.js write-checkpoint \
658
- --file speccrew-workspace/iterations/{iteration_id}/02.feature-design/.checkpoints.json \
665
+ node "{workspace_path}/scripts/update-progress.js" write-checkpoint \
666
+ --file "{workspace_path}/iterations/{iteration_id}/02.feature-design/.checkpoints.json" \
659
667
  --stage 02_feature_design \
660
668
  --checkpoint feature_spec_review \
661
669
  --passed true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "speccrew",
3
- "version": "0.7.32",
3
+ "version": "0.7.33",
4
4
  "description": "Spec-Driven Development toolkit for AI-powered IDEs",
5
5
  "author": "charlesmu99",
6
6
  "repository": {
@@ -35,6 +35,7 @@
35
35
  * --output <text> Task output (used when completed)
36
36
  * --error <text> Error message (used when failed)
37
37
  * --error-category <cat> Error category (used when failed)
38
+ * --metadata <json> Metadata JSON string to merge into task
38
39
  *
39
40
  * 4. update-counts - Force recalculate counts
40
41
  * node update-progress.js update-counts --file <path>
@@ -252,7 +253,8 @@ function parseArgs() {
252
253
  confirmedAt: null,
253
254
  featuresDir: null,
254
255
  platforms: null,
255
- force: false
256
+ force: false,
257
+ metadata: null
256
258
  };
257
259
 
258
260
  // First argument is the command
@@ -357,6 +359,10 @@ function parseArgs() {
357
359
  case '-Matcher-Result':
358
360
  result.matcherResult = args[++i];
359
361
  break;
362
+ case '--metadata':
363
+ case '-Metadata':
364
+ result.metadata = args[++i];
365
+ break;
360
366
  }
361
367
  }
362
368
 
@@ -619,6 +625,16 @@ function cmdUpdateTask(args) {
619
625
  }
620
626
  }
621
627
 
628
+ // Handle metadata (merge into task)
629
+ if (args.metadata) {
630
+ try {
631
+ const metadataObj = JSON.parse(args.metadata);
632
+ task.metadata = { ...task.metadata, ...metadataObj };
633
+ } catch (e) {
634
+ outputError(`Failed to parse metadata JSON: ${e.message}`);
635
+ }
636
+ }
637
+
622
638
  // Update task
623
639
  data.tasks[taskIndex] = task;
624
640
  data.updated_at = now;