speccrew 0.6.15 → 0.6.17

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.
@@ -594,12 +594,39 @@ This context will be passed to Phase 3 (Requirement Clarification) and Phase 4 (
594
594
 
595
595
  ## Phase 2: Complexity Assessment & Skill Routing
596
596
 
597
- > **PRE-CONDITION**: Path B Steps 2-5 must be completed before entering Phase 2.
598
- > If matched_modules exist but knowledges/bizs/ directories are empty, Path B was not fully executed.
599
- > Go back and execute the remaining Path B steps.
600
-
601
597
  Before starting requirement analysis, assess the requirement complexity to determine the appropriate skill path.
602
598
 
599
+ ### Phase 2.0: Knowledge Initialization Verification (MANDATORY)
600
+
601
+ > ⚠️ **THIS STEP IS MANDATORY AND CANNOT BE SKIPPED**
602
+ > You MUST execute the verification commands below before ANY complexity assessment.
603
+
604
+ **Step 2.0.1**: Check if DISPATCH-PROGRESS.json exists:
605
+ ```bash
606
+ # Read the file — if it does not exist, Path B Step 1.5 was not executed
607
+ cat "{workspace_path}/knowledges/bizs/DISPATCH-PROGRESS.json"
608
+ ```
609
+
610
+ **Step 2.0.2**: Evaluate the file content:
611
+
612
+ | Condition | Action |
613
+ |-----------|--------|
614
+ | File does NOT exist | Path B was not executed. Go back to Phase 1.2 Path B Step 1. |
615
+ | File exists, `counts.pending > 0` | Knowledge initialization is INCOMPLETE. Go back to Path B Step 3 and dispatch remaining tasks. |
616
+ | File exists, `counts.pending == 0` AND `counts.completed > 0` | Knowledge initialization is COMPLETE. Proceed to Phase 2.1. |
617
+ | File exists, `counts.total == 0` | No features to analyze (all already analyzed). Proceed to Phase 2.1. |
618
+
619
+ **Step 2.0.3**: If going back to Path B:
620
+ 1. Read DISPATCH-PROGRESS.json to get pending task list
621
+ 2. For each module with pending tasks, dispatch `speccrew-task-worker` with `speccrew-pm-module-initializer` skill (if Step 2 not done)
622
+ 3. Then dispatch analyze Workers for all pending features (Step 3)
623
+ 4. Then dispatch summarize Workers (Step 4)
624
+ 5. Update features status (Step 5)
625
+ 6. Return here to Phase 2.0 and re-verify
626
+
627
+ > 🔴 **ABSOLUTE RULE**: DO NOT proceed to Phase 2.1 (Complexity Assessment) while `counts.pending > 0`.
628
+ > The matcher identified these features as relevant. Skipping their analysis means the PRD will lack existing system feature descriptions.
629
+
603
630
  ### 2.1 Complexity Indicators
604
631
 
605
632
  Evaluate the user's requirement against these indicators:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "speccrew",
3
- "version": "0.6.15",
3
+ "version": "0.6.17",
4
4
  "description": "Spec-Driven Development toolkit for AI-powered IDEs",
5
5
  "author": "charlesmu99",
6
6
  "repository": {
@@ -915,8 +915,10 @@ function cmdInitKnowledgeTasks(args) {
915
915
  const filePath = path.join(featuresDir, file);
916
916
  try {
917
917
  const data = readJsonFile(filePath);
918
- if (data.platform_id) {
919
- featuresDataByPlatform[data.platform_id] = data;
918
+ // Support both platformId (camelCase) and platform_id (snake_case)
919
+ const platformId = data.platformId || data.platform_id;
920
+ if (platformId) {
921
+ featuresDataByPlatform[platformId] = data;
920
922
  }
921
923
  } catch (e) {
922
924
  outputError(`Failed to parse features file ${file}: ${e.message}`);
@@ -942,11 +944,9 @@ function cmdInitKnowledgeTasks(args) {
942
944
  } else {
943
945
  // Look up features from features-*.json files
944
946
  const platformData = featuresDataByPlatform[platform_id];
945
- if (platformData && platformData.modules && platformData.modules[module_name]) {
946
- const moduleData = platformData.modules[module_name];
947
- if (moduleData.features && Array.isArray(moduleData.features)) {
948
- featuresToProcess = moduleData.features;
949
- }
947
+ if (platformData && platformData.features && Array.isArray(platformData.features)) {
948
+ // Filter features by module name
949
+ featuresToProcess = platformData.features.filter(f => f.module === module_name);
950
950
  }
951
951
  }
952
952