speccrew 0.6.45 → 0.6.47

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.
@@ -420,6 +420,27 @@ When executing XML workflow blocks, map actions to IDE tools as follows:
420
420
 
421
421
  **FORBIDDEN**: Do NOT manually search directories for SKILL.md files. Do NOT execute worker tasks yourself — always delegate via Task tool.
422
422
 
423
+ ## DISPATCH SKILL EXECUTION PROTOCOL
424
+
425
+ When you load a dispatch skill (e.g., `speccrew-knowledge-bizs-dispatch-xml` or `speccrew-knowledge-techs-dispatch-xml`) via the Skill tool:
426
+
427
+ 1. **You ARE the executor** — do NOT delegate the entire workflow to someone else
428
+ 2. **Read the XML workflow** in the loaded SKILL.md from top to bottom
429
+ 3. **Execute each block** according to its `action` attribute:
430
+ - `run-script` → Terminal tool
431
+ - `run-skill` → Skill tool (do NOT browse directories for SKILL.md)
432
+ - `dispatch-to-worker` → Task tool (create Task for speccrew-task-worker)
433
+ 4. **For `<loop parallel="true">` with `dispatch-to-worker`**: create ALL worker Tasks in ONE batch
434
+ 5. **For `<event action="confirm">`**: present to user and wait
435
+ 6. **For `<checkpoint>`**: verify condition before proceeding to next stage
436
+ 7. **Execute ALL stages in sequence** — Stage 0 → 1a → 1b → 1c → 2 → 3 → 4 (or as defined)
437
+
438
+ **CRITICAL FORBIDDEN BEHAVIORS**:
439
+ - Do NOT run terminal commands as a substitute for calling a Skill via Skill tool
440
+ - Do NOT manually create JSON files when a Skill should generate them
441
+ - Do NOT execute analysis work that should be dispatched to a Worker via Task tool
442
+ - Do NOT stop between stages to ask the user for direction
443
+
423
444
  ## CONTINUOUS EXECUTION RULES
424
445
 
425
446
  This agent MUST execute tasks continuously without unnecessary interruptions.
@@ -4,6 +4,20 @@ description: Dispatch bizs knowledge base generation tasks with 5-stage pipeline
4
4
  tools: Read, Write, Task, Bash
5
5
  ---
6
6
 
7
+ > **⚠️ MANDATORY EXECUTION PROTOCOL — READ BEFORE EXECUTING ANY BLOCK**
8
+ >
9
+ > **Step 1**: Load XML workflow specification: `docs/rules/xml-workflow-spec.md` — this defines all block types and action-to-tool mappings
10
+ >
11
+ > **Step 2**: Execute this SKILL.md's XML workflow **block by block in document order**:
12
+ > - `action="run-script"` → Execute via **Terminal tool** (PowerShell/Bash)
13
+ > - `action="run-skill"` → Invoke via **Skill tool** (do NOT manually read SKILL.md files or browse directories)
14
+ > - `action="dispatch-to-worker"` → Create **Task** via **Task tool** for `speccrew-task-worker`
15
+ > - `action="confirm"` (event) → Present to user and wait for response
16
+ >
17
+ > **Step 3**: Execute ALL stages sequentially without pausing (only stop at explicit `<event action="confirm">` blocks)
18
+ >
19
+ > **FORBIDDEN**: Do NOT run terminal commands as substitute for Skill tool calls. Do NOT do Worker's job yourself. Do NOT skip blocks or improvise.
20
+
7
21
  # Bizs Knowledge Dispatch (XML Block Version)
8
22
 
9
23
  Orchestrate **bizs knowledge base generation** with a 5-stage pipeline using **XML Block system**: Feature Inventory → Feature Analysis + Graph Write → Module Summarize → UI Style Pattern Extract → System Summary.
@@ -85,7 +99,6 @@ Stage 4: System Summary
85
99
  ## XML Workflow Definition
86
100
 
87
101
  <workflow id="bizs-dispatch-main" status="pending" version="1.0" desc="bizs knowledge base generation 5-stage pipeline">
88
- > **REQUIRED**: Before executing this workflow, read the XML workflow specification: `docs/rules/xml-workflow-spec.md`
89
102
 
90
103
  <!-- ============================================================
91
104
  Input Parameters Definition
@@ -810,41 +823,11 @@ Failure rate exceeds 50%, terminating entire pipeline
810
823
 
811
824
  ---
812
825
 
813
- ## Input/Output Specification (Supplementary)
814
-
815
- ### Input Parameters
816
-
817
- | Variable | Description | Default |
818
- |----------|-------------|---------|
819
- | `source_path` | Source code path (can be a subdirectory; auto-detects platform root by traversing upward) | project root |
820
- | `language` | User's language code (e.g., "zh", "en") | **REQUIRED** |
821
- | `sync_mode` | `"full"` or `"incremental"` | `"full"` |
822
- | `base_commit` | (incremental only) Git base commit hash | — |
823
- | `head_commit` | (incremental only) Git HEAD commit hash | `HEAD` |
824
- | `changed_files` | (incremental only) Pre-computed changed file list | — |
825
- | `max_concurrent_workers` | Maximum parallel Worker Agents | `5` |
826
- | `workspace_path` | **(required)** Absolute path to speccrew-workspace directory | — |
827
- | `sync_state_bizs_dir` | **(required)** Absolute path to `knowledges/base/sync-state/knowledge-bizs/` | — |
828
- | `ide_skills_dir` | **(required)** Absolute path to IDE skills directory (e.g., `.qoder/skills`, `.cursor/skills`) | — |
829
- | `configs_dir` | **(required)** Absolute path to `docs/configs/` directory | — |
830
- | `graph_root` | Graph data output root path (absolute path preferred) | `{workspace_path}/knowledges/bizs/graph` |
831
- | `completed_dir` | **(required)** Marker file output directory for Worker results (absolute path required) | — |
832
-
833
- > **MANDATORY**: All path parameters MUST be absolute paths provided by the caller. DO NOT use ListDir to search for script locations. DO NOT construct paths by guessing or relative path resolution.
834
-
835
- ### Output Files
836
-
837
- - Entry directories: `{sync_state_bizs_dir}/entry-dirs-{platform}.json`
838
- - Feature inventory: `{sync_state_bizs_dir}/features-{platform}.json`
839
- - Feature docs: `{workspace_path}/knowledges/bizs/{platform}/{module}/features/*.md`
840
- - Module overviews: `{workspace_path}/knowledges/bizs/{platform}/{module}/*-overview.md`
841
- - UI style patterns: `{workspace_path}/knowledges/techs/{platform_id}/ui-style-patterns/` (page-types/, components/, layouts/)
842
- - System overview: `{workspace_path}/knowledges/bizs/system-overview.md`
843
- - Graph data: `{workspace_path}/knowledges/bizs/graph/`
826
+ ## Appendix: Reference
844
827
 
845
- ---
828
+ ### Skill Routing Table (Stage 2)
846
829
 
847
- ## Skill Routing Table (Stage 2)
830
+ > **Note**: Detailed routing logic is defined in XML Stage 2 gateway (S2-G1).
848
831
 
849
832
  | platformType | skill_name | Description |
850
833
  |--------------|------------|-------------|
@@ -853,11 +836,9 @@ Failure rate exceeds 50%, terminating entire pipeline
853
836
  | `desktop` | `speccrew-knowledge-bizs-ui-analyze-xml` | Desktop apps (Electron/WPF) |
854
837
  | `backend` | `speccrew-knowledge-bizs-api-analyze-xml` | Backend APIs (Java/Python/Node.js) |
855
838
 
856
- > **CRITICAL**: Use this routing table to select the correct skill for each feature.
857
-
858
839
  ---
859
840
 
860
- ## Platform Types
841
+ ### Platform Types
861
842
 
862
843
  | Platform Type | Platform Subtype | Description |
863
844
  |---------------|------------------|-------------|
@@ -868,9 +849,9 @@ Failure rate exceeds 50%, terminating entire pipeline
868
849
 
869
850
  ---
870
851
 
871
- ## Worker Completion Marker Format
852
+ ### Worker Completion Marker Format
872
853
 
873
- ### Marker File Naming Convention
854
+ #### Marker File Naming Convention
874
855
 
875
856
  **Pattern**: `{module}-{subpath}-{fileName}.{type}.json`
876
857
 
@@ -889,7 +870,7 @@ Failure rate exceeds 50%, terminating entire pipeline
889
870
  | `user/admin/UserController.java` | `user-admin-UserController.done.json` |
890
871
  | `order/api/v2/OrderService.java` | `order-api-v2-OrderService.done.json` |
891
872
 
892
- ### .done.json Required Fields
873
+ #### .done.json Required Fields
893
874
 
894
875
  ```json
895
876
  {
@@ -907,9 +888,9 @@ Failure rate exceeds 50%, terminating entire pipeline
907
888
 
908
889
  ---
909
890
 
910
- ## Batch Processing Details
891
+ ### Batch Processing Details
911
892
 
912
- ### get-batch Script Output Format
893
+ #### get-batch Script Output Format
913
894
 
914
895
  ```json
915
896
  {
@@ -930,7 +911,7 @@ Failure rate exceeds 50%, terminating entire pipeline
930
911
  }
931
912
  ```
932
913
 
933
- ### process-results Script Behavior
914
+ #### process-results Script Behavior
934
915
 
935
916
  - Scans `.done.json` files → updates feature status to `completed` in features-*.json
936
917
  - Scans `.graph-done.json` files → confirms graph data generation complete
@@ -939,128 +920,14 @@ Failure rate exceeds 50%, terminating entire pipeline
939
920
 
940
921
  ---
941
922
 
942
- ## Stateless Design (Context Recovery)
943
-
944
- Dispatch adopts a fully stateless file-driven design. If context compression or interruption occurs during execution:
945
-
946
- - No need to memorize any batch state or Worker output
947
- - Re-execute loop: `get-batch` will automatically recover from file state, skipping completed and in-progress features
948
- - `process-results` will process all uncleaned marker files
949
- - The entire flow is safely re-entrant
950
-
951
- ---
952
-
953
- ## Large-Scale Scenario Guidance
954
-
955
- When modules contain **more than 20 Features**:
956
-
957
- - **Single Agent Limit**: A single Worker Agent can reliably process ~20 features per session due to context window constraints. Beyond this, context degradation may cause incomplete document generation.
958
- - **Multi-Worker Strategy**: For modules with >20 features, the calling Agent should dispatch multiple Worker Agents in parallel, each handling a non-overlapping subset of features.
959
- - **Resume Support**: The `get-next-batch` script naturally supports resume across sessions — it skips features that already have `.done` files.
960
- - **Validation After Completion**: After all features are marked `analyzed=true`, run `process-batch-results` with `--validateDocs --syncStatePath` to verify document completeness.
961
-
962
- ---
963
-
964
- ## Error Handling Strategy
965
-
966
- | Stage | Failure Scenario | Handling | Retry |
967
- |-------|-----------------|----------|-------|
968
- | Stage 0 | Platform detection fails | Abort pipeline, report error | No retry |
969
- | Stage 1a | Entry directory recognition fails | Abort pipeline, report platform details | No retry |
970
- | Stage 1b | Script execution fails | Abort pipeline, report error | No retry |
971
- | Stage 1c | Feature merge fails | Abort pipeline, do not proceed to Stage 2 until resolved | No retry |
972
- | Stage 2 | Single Worker fails | Mark feature as `failed`, continue other Workers | No auto-retry |
973
- | Stage 2 | Failure rate > 50% | Abort pipeline, report all failures | — |
974
- | Stage 3 | Single Worker fails | Skip that module, continue others | Retry once |
975
- | Stage 3.5 | Pattern extraction fails | Continue pipeline, report warning | — |
976
- | Stage 4 | Worker fails | Abort, preserve all generated content | Retry once |
977
-
978
- **Failed Feature Handling**: Features marked as `failed` via `update-feature-status` script retain their error details in `features-{platform}.json` for manual inspection or re-run.
979
-
980
- ---
981
-
982
- ## Task Completion Report Format
923
+ ### Stateless Design
983
924
 
984
- Upon completing all stages, output the following structured report:
985
-
986
- ```json
987
- {
988
- "status": "success | partial | failed",
989
- "skill": "speccrew-knowledge-bizs-dispatch-xml",
990
- "stages_completed": ["stage_0", "stage_1a", "stage_1b", "stage_1c", "stage_2", "stage_3", "stage_3.5", "stage_4"],
991
- "stages_failed": [],
992
- "output_summary": {
993
- "platforms_processed": ["web-vue", "backend-system"],
994
- "features_analyzed": 32,
995
- "modules_summarized": 8,
996
- "ui_patterns_extracted": 15,
997
- "system_overview_generated": true
998
- },
999
- "output_files": [
1000
- "knowledges/bizs/{platform}/{module}/features/*.md",
1001
- "knowledges/bizs/{platform}/{module}/*-overview.md",
1002
- "knowledges/techs/{platform_id}/ui-style-patterns/",
1003
- "knowledges/bizs/system-overview.md",
1004
- "knowledges/bizs/graph/"
1005
- ],
1006
- "errors": [],
1007
- "next_steps": ["Initialize techs knowledge base"]
1008
- }
1009
- ```
1010
-
1011
- ---
1012
-
1013
- ## Return Value Structure
1014
-
1015
- After all 5 stages complete, return a summary object to the caller:
1016
-
1017
- ```json
1018
- {
1019
- "status": "completed",
1020
- "pipeline": "bizs",
1021
- "stages": {
1022
- "stage0": { "status": "completed", "platforms": 2 },
1023
- "stage1a": { "status": "completed", "platforms": 2, "modules": 12 },
1024
- "stage1b": { "status": "completed", "platforms": 2, "features": 32 },
1025
- "stage1c": { "status": "completed", "mode": "full" },
1026
- "stage2": { "status": "completed", "analyzed": 32, "failed": 0, "graphWritten": 32 },
1027
- "stage3": { "status": "completed", "modules": 8, "failed": 0 },
1028
- "stage3_5": { "status": "completed", "platforms": 2, "patterns": 15 },
1029
- "stage4": { "status": "completed" }
1030
- },
1031
- "output": {
1032
- "system_overview": "{workspace_path}/knowledges/bizs/system-overview.md",
1033
- "graph_root": "{workspace_path}/knowledges/bizs/graph/"
1034
- }
1035
- }
1036
- ```
925
+ Dispatch adopts a fully stateless file-driven design. Re-execute loop to recover: `get-batch` auto-recovers from file state; `process-results` handles uncleaned markers. The entire flow is safely re-entrant.
1037
926
 
1038
927
  ---
1039
928
 
1040
- ## CONTINUOUS EXECUTION RULES
1041
-
1042
- This skill MUST execute all stages continuously without unnecessary interruptions.
1043
-
1044
- ### FORBIDDEN Interruptions
1045
-
1046
- 1. DO NOT ask user "Should I continue?" after completing a stage
1047
- 2. DO NOT suggest "Let me split this into batches" or "Let's do this in parts"
1048
- 3. DO NOT pause to list what you plan to do next — just do it
1049
- 4. DO NOT ask for confirmation before generating output files
1050
- 5. DO NOT warn about "large number of files" — proceed with generation
1051
- 6. DO NOT offer "Should I proceed with the remaining items?"
1052
- 7. DO NOT present options like "Full execution / Sample execution / Pause"
1053
-
1054
- ### When to Pause (ONLY these cases)
929
+ ### Large-Scale Scenario Guidance
1055
930
 
1056
- 1. Explicit `<event action="confirm">` blocks in the workflow (e.g., Stage 0 platform confirmation)
1057
- 2. Ambiguous requirements that genuinely need clarification
1058
- 3. Unrecoverable errors that prevent further progress (failure rate > 50%)
1059
- 4. Security-sensitive operations (e.g., deleting existing files)
931
+ For modules with >20 features: dispatch multiple Worker Agents in parallel (each handles a subset). Use `get-next-batch` for resume support across sessions. Run `process-batch-results --validateDocs` after completion to verify.
1060
932
 
1061
- ### Batch Execution Behavior
1062
933
 
1063
- - When multiple features need processing, process ALL of them sequentially without asking
1064
- - Use marker files (.done.json) to track progress, enabling resumption if interrupted by context limits
1065
- - If context window is approaching limit, save progress to checkpoint and inform user how to resume
1066
- - NEVER voluntarily stop mid-batch to ask if user wants to continue
@@ -4,6 +4,20 @@ description: Dispatch techs knowledge base generation tasks with 3-stage pipelin
4
4
  tools: Read, Write, Task, Bash
5
5
  ---
6
6
 
7
+ > **⚠️ MANDATORY EXECUTION PROTOCOL — READ BEFORE EXECUTING ANY BLOCK**
8
+ >
9
+ > **Step 1**: Load XML workflow specification: `docs/rules/xml-workflow-spec.md` — this defines all block types and action-to-tool mappings
10
+ >
11
+ > **Step 2**: Execute this SKILL.md's XML workflow **block by block in document order**:
12
+ > - `action="run-script"` → Execute via **Terminal tool** (PowerShell/Bash)
13
+ > - `action="run-skill"` → Invoke via **Skill tool** (do NOT manually read SKILL.md files or browse directories)
14
+ > - `action="dispatch-to-worker"` → Create **Task** via **Task tool** for `speccrew-task-worker`
15
+ > - `action="confirm"` (event) → Present to user and wait for response
16
+ >
17
+ > **Step 3**: Execute ALL stages sequentially without pausing (only stop at explicit `<event action="confirm">` blocks)
18
+ >
19
+ > **FORBIDDEN**: Do NOT run terminal commands as substitute for Skill tool calls. Do NOT do Worker's job yourself. Do NOT skip blocks or improvise.
20
+
7
21
  # Techs Knowledge Dispatch (XML Block Version)
8
22
 
9
23
  Orchestrate **techs knowledge base generation** with a 3-stage pipeline using **XML Block system**: Platform Detection → Tech Doc Generation → Root Index.
@@ -610,11 +624,13 @@ Stage 3 complete. Root INDEX.md generated.
610
624
 
611
625
  ---
612
626
 
613
- ## Worker Completion Marker Format
627
+ ## Appendix: Reference
628
+
629
+ ### Worker Completion Marker Format
614
630
 
615
631
  Each Worker MUST create a completion marker file after generating documents.
616
632
 
617
- ### Conventions Worker Done File
633
+ #### Conventions Worker Done File
618
634
 
619
635
  **File**: `{completed_dir}/{platform_id}.done-conventions.json`
620
636
 
@@ -634,7 +650,7 @@ Each Worker MUST create a completion marker file after generating documents.
634
650
  }
635
651
  ```
636
652
 
637
- ### UI-Style Worker Done File
653
+ #### UI-Style Worker Done File
638
654
 
639
655
  **File**: `{completed_dir}/{platform_id}.done-ui-style.json`
640
656
 
@@ -659,7 +675,7 @@ Each Worker MUST create a completion marker file after generating documents.
659
675
 
660
676
  If a Worker encounters a fatal error, it should still attempt to create the done file with `status: "failed"` and include error details in an `"error"` field.
661
677
 
662
- ### Quality Worker Done File
678
+ #### Quality Worker Done File
663
679
 
664
680
  **File**: `{completed_dir}/{platform_id}.quality-done.json`
665
681
 
@@ -677,7 +693,7 @@ If a Worker encounters a fatal error, it should still attempt to create the done
677
693
 
678
694
  ---
679
695
 
680
- ## Platform Status Tracking Fields
696
+ ### Platform Status Tracking Fields
681
697
 
682
698
  Each platform entry in techs-manifest.json includes status tracking fields for monitoring the analysis pipeline progress:
683
699
 
@@ -721,7 +737,7 @@ pending → processing → completed
721
737
 
722
738
  ---
723
739
 
724
- ## Output per Platform
740
+ ### Output per Platform
725
741
 
726
742
  ```
727
743
  speccrew-workspace/knowledges/techs/{platform_id}/
@@ -759,9 +775,9 @@ speccrew-workspace/knowledges/techs/{platform_id}/
759
775
 
760
776
  ---
761
777
 
762
- ## Error Handling
778
+ ### Error Handling
763
779
 
764
- ### Error Handling Strategy
780
+ #### Error Handling Strategy
765
781
 
766
782
  ```
767
783
  ON Worker Failure:
@@ -774,7 +790,7 @@ ON Worker Failure:
774
790
  - IF some platforms succeeded → CONTINUE to Stage 3 with successful platforms only
775
791
  ```
776
792
 
777
- ### Stage-Level Failure Handling
793
+ #### Stage-Level Failure Handling
778
794
 
779
795
  | Stage | Failure Handling |
780
796
  |-------|-----------------|
@@ -783,7 +799,7 @@ ON Worker Failure:
783
799
  | Stage 2.5 | Continue pipeline, report warnings |
784
800
  | Stage 3 | Abort if Stage 2 had critical failures |
785
801
 
786
- ### Worker Failure Details
802
+ #### Worker Failure Details
787
803
 
788
804
  **When a Worker Agent fails:**
789
805
  - **No automatic retry**: Worker failures are recorded as-is
@@ -793,7 +809,7 @@ ON Worker Failure:
793
809
 
794
810
  ---
795
811
 
796
- ## Checklist
812
+ ### Checklist
797
813
 
798
814
  - [ ] Stage 1: Platform manifest generated with techs-manifest.json
799
815
  - [ ] Stage 2: All platforms processed in parallel
@@ -801,89 +817,9 @@ ON Worker Failure:
801
817
  - [ ] Stage 3: Root INDEX.md generated with Agent mapping
802
818
  - [ ] Stage 3: `stage3-status.json` generated with index info
803
819
 
804
- ### Document Completeness Verification
820
+ #### Document Completeness Verification
805
821
  - [ ] Each platform directory contains required documents: INDEX.md, tech-stack.md, architecture.md, conventions-design.md, conventions-dev.md, conventions-unit-test.md, conventions-system-test.md, conventions-build.md
806
822
  - [ ] `conventions-data.md` exists only for appropriate platforms (backend required, others optional)
807
823
  - [ ] All documents include file reference blocks (pure Markdown format for VS Code preview compatibility)
808
824
  - [ ] All documents include AI-TAG and AI-CONTEXT comments
809
825
  - [ ] techs/INDEX.md links only to existing documents
810
-
811
- ---
812
-
813
- ## Task Completion Report Format
814
-
815
- Upon completing all stages, output the following structured report:
816
-
817
- ```json
818
- {
819
- "status": "success | partial | failed",
820
- "skill": "speccrew-knowledge-techs-dispatch-xml",
821
- "stages_completed": ["stage_1", "stage_2", "stage_2_5", "stage_3"],
822
- "stages_failed": [],
823
- "output_summary": {
824
- "platforms_processed": ["frontend", "backend"],
825
- "docs_generated_per_platform": {"frontend": 5, "backend": 4},
826
- "root_index_generated": true,
827
- "cross_platform_check_passed": true
828
- },
829
- "output_files": [
830
- "knowledges/techs/{platform}/README.md",
831
- "knowledges/techs/{platform}/conventions.md",
832
- "knowledges/techs/README.md"
833
- ],
834
- "errors": [],
835
- "next_steps": ["Review generated tech documentation"]
836
- }
837
- ```
838
-
839
- ---
840
-
841
- ## Return Value Structure
842
-
843
- After all 3 stages complete, return a summary object to the caller:
844
-
845
- ```json
846
- {
847
- "status": "completed",
848
- "pipeline": "techs",
849
- "stages": {
850
- "stage1": { "status": "completed", "platforms": 3 },
851
- "stage2": { "status": "completed", "completed": 3, "failed": 0 },
852
- "stage3": { "status": "completed" }
853
- },
854
- "output": {
855
- "index": "speccrew-workspace/knowledges/techs/INDEX.md",
856
- "manifest": "speccrew-workspace/knowledges/base/sync-state/knowledge-techs/techs-manifest.json"
857
- }
858
- }
859
- ```
860
-
861
- ---
862
-
863
- ## CONTINUOUS EXECUTION RULES
864
-
865
- This skill MUST execute all stages continuously without unnecessary interruptions.
866
-
867
- ### FORBIDDEN Interruptions
868
-
869
- 1. DO NOT ask user "Should I continue?" after completing a stage
870
- 2. DO NOT suggest "Let me split this into batches" or "Let's do this in parts"
871
- 3. DO NOT pause to list what you plan to do next — just do it
872
- 4. DO NOT ask for confirmation before generating output files
873
- 5. DO NOT warn about "large number of files" — proceed with generation
874
- 6. DO NOT offer "Should I proceed with the remaining items?"
875
- 7. DO NOT present options like "Full execution / Sample execution / Pause"
876
-
877
- ### When to Pause (ONLY these cases)
878
-
879
- 1. Explicit `<event action="confirm">` blocks in the workflow (e.g., platform confirmation if needed)
880
- 2. Ambiguous requirements that genuinely need clarification
881
- 3. Unrecoverable errors that prevent further progress (failure rate > 50%)
882
- 4. Security-sensitive operations (e.g., deleting existing files)
883
-
884
- ### Batch Execution Behavior
885
-
886
- - When multiple platforms need processing, process ALL of them without asking
887
- - Use marker files (.done.json) to track progress, enabling resumption if interrupted by context limits
888
- - If context window is approaching limit, save progress to checkpoint and inform user how to resume
889
- - NEVER voluntarily stop mid-batch to ask if user wants to continue
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "speccrew",
3
- "version": "0.6.45",
3
+ "version": "0.6.47",
4
4
  "description": "Spec-Driven Development toolkit for AI-powered IDEs",
5
5
  "author": "charlesmu99",
6
6
  "repository": {
@@ -329,6 +329,38 @@ Use `${variable_name}` syntax throughout block attributes and content.
329
329
  </block>
330
330
  ```
331
331
 
332
+ ## Dispatch Skill Execution Model
333
+
334
+ Dispatch skills (naming pattern: `*-dispatch-xml`) are **orchestration playbooks** loaded directly by Team Leader via the Skill tool. They contain the complete multi-stage workflow definition.
335
+
336
+ ### Execution Protocol
337
+
338
+ When Team Leader loads a dispatch skill via `action="run-skill"`:
339
+
340
+ 1. **Load**: Team Leader invokes the Skill tool with the dispatch skill name (e.g., `speccrew-knowledge-bizs-dispatch-xml`)
341
+ 2. **Parse**: Read and understand the complete XML workflow in the loaded SKILL.md
342
+ 3. **Execute block-by-block**: Walk through each Stage's blocks in document order, mapping each `action` attribute to the correct IDE tool:
343
+
344
+ | Block Action | What Team Leader MUST Do |
345
+ |---|---|
346
+ | `action="run-script"` | Execute the command via **Terminal tool** (PowerShell/Bash) |
347
+ | `action="run-skill"` | Invoke the skill via **Skill tool** — do NOT manually read SKILL.md files |
348
+ | `action="dispatch-to-worker"` | Create Task via **Task tool**, assign to `speccrew-task-worker` |
349
+ | `action="analyze"` | Perform analysis directly (read files, extract info) |
350
+ | `action="generate"` | Generate content directly (use templates, write output) |
351
+ | `action="confirm"` (event) | Present confirmation to user, wait for response |
352
+
353
+ 4. **Respect control flow**: Honor `<gateway>` branches, `<loop parallel="true">` concurrency, and `<checkpoint>` verification
354
+ 5. **Continuous execution**: Proceed from Stage N to Stage N+1 automatically — ONLY pause at explicit `<event action="confirm">` blocks
355
+
356
+ ### FORBIDDEN During Dispatch Execution
357
+
358
+ - **NEVER** execute commands manually when a block says `action="run-skill"` — use the Skill tool
359
+ - **NEVER** do a worker's job yourself when a block says `action="dispatch-to-worker"` — use the Task tool
360
+ - **NEVER** skip stages or blocks
361
+ - **NEVER** pause between stages to ask "Should I continue?"
362
+ - **NEVER** improvise your own approach — follow the XML blocks exactly
363
+
332
364
  ## Action to IDE Tool Mapping
333
365
 
334
366
  When executing `<block type="task">` blocks, the `action` attribute determines which **IDE tool** to invoke. Do NOT interpret actions freely — use the exact tool specified below: