speccrew 0.6.46 → 0.6.48
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.
- package/.speccrew/skills/speccrew-knowledge-bizs-api-graph-xml/SKILL.md +7 -7
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch-xml/SKILL.md +40 -183
- package/.speccrew/skills/speccrew-knowledge-bizs-identify-entries-xml/SKILL.md +6 -2
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze-xml/SKILL.md +13 -13
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-graph-xml/SKILL.md +5 -5
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-style-extract-xml/SKILL.md +9 -3
- package/.speccrew/skills/speccrew-knowledge-module-summarize-xml/SKILL.md +7 -7
- package/.speccrew/skills/speccrew-knowledge-system-summarize-xml/SKILL.md +8 -8
- package/.speccrew/skills/speccrew-knowledge-techs-dispatch-xml/SKILL.md +32 -110
- package/.speccrew/skills/speccrew-knowledge-techs-generate-quality-xml/SKILL.md +11 -11
- package/.speccrew/skills/speccrew-knowledge-techs-generate-ui-style-xml/SKILL.md +9 -9
- package/.speccrew/skills/speccrew-knowledge-techs-generate-xml/SKILL.md +4 -4
- package/.speccrew/skills/speccrew-knowledge-techs-index-xml/SKILL.md +2 -2
- package/package.json +1 -1
- package/workspace-template/docs/rules/xml-workflow-spec.md +13 -5
|
@@ -137,7 +137,7 @@ This skill operates in **strict sequential execution mode**:
|
|
|
137
137
|
</block>
|
|
138
138
|
|
|
139
139
|
<block type="event" id="E1" action="log" level="info" desc="Log step 1 completion">
|
|
140
|
-
Step 1 Status: COMPLETED - Read ${api_analysis_path}, Found ${endpoints.length} endpoints
|
|
140
|
+
<field name="message">Step 1 Status: COMPLETED - Read ${api_analysis_path}, Found ${endpoints.length} endpoints</field>
|
|
141
141
|
</block>
|
|
142
142
|
</sequence>
|
|
143
143
|
|
|
@@ -212,7 +212,7 @@ Step 1 Status: COMPLETED - Read ${api_analysis_path}, Found ${endpoints.length}
|
|
|
212
212
|
</block>
|
|
213
213
|
|
|
214
214
|
<block type="event" id="E2" action="log" level="info" desc="Log step 2 completion">
|
|
215
|
-
Step 2 Status: COMPLETED - Extracted graph nodes (${apiNodes.length} APIs, ${serviceNodes.length} services, ${tableNodes.length} tables, ${dtoNodes.length} DTOs)
|
|
215
|
+
<field name="message">Step 2 Status: COMPLETED - Extracted graph nodes (${apiNodes.length} APIs, ${serviceNodes.length} services, ${tableNodes.length} tables, ${dtoNodes.length} DTOs)</field>
|
|
216
216
|
</block>
|
|
217
217
|
</sequence>
|
|
218
218
|
|
|
@@ -291,7 +291,7 @@ Step 2 Status: COMPLETED - Extracted graph nodes (${apiNodes.length} APIs, ${ser
|
|
|
291
291
|
</block>
|
|
292
292
|
|
|
293
293
|
<block type="event" id="E3" action="log" level="info" desc="Log step 3 completion">
|
|
294
|
-
Step 3 Status: COMPLETED - Extracted graph edges (${operatesEdges.length + invokesEdges.length + referencesEdges.length + dependsOnEdges.length + mapsToEdges.length} total)
|
|
294
|
+
<field name="message">Step 3 Status: COMPLETED - Extracted graph edges (${operatesEdges.length + invokesEdges.length + referencesEdges.length + dependsOnEdges.length + mapsToEdges.length} total)</field>
|
|
295
295
|
</block>
|
|
296
296
|
</sequence>
|
|
297
297
|
|
|
@@ -315,7 +315,7 @@ Step 3 Status: COMPLETED - Extracted graph edges (${operatesEdges.length + invok
|
|
|
315
315
|
</block>
|
|
316
316
|
|
|
317
317
|
<block type="event" id="E4" action="log" level="info" desc="Log step 4 completion">
|
|
318
|
-
Step 4 Status: COMPLETED - Graph JSON written to ${output_dir}/${markerFilename}.graph.json
|
|
318
|
+
<field name="message">Step 4 Status: COMPLETED - Graph JSON written to ${output_dir}/${markerFilename}.graph.json</field>
|
|
319
319
|
</block>
|
|
320
320
|
</sequence>
|
|
321
321
|
|
|
@@ -331,7 +331,7 @@ Step 4 Status: COMPLETED - Graph JSON written to ${output_dir}/${markerFilename}
|
|
|
331
331
|
</block>
|
|
332
332
|
|
|
333
333
|
<block type="event" id="E5" action="log" level="info" desc="Log step 5 completion">
|
|
334
|
-
Step 5 Status: COMPLETED - Graph completion marker written to ${output_dir}/${markerFilename}.graph-done.json
|
|
334
|
+
<field name="message">Step 5 Status: COMPLETED - Graph completion marker written to ${output_dir}/${markerFilename}.graph-done.json</field>
|
|
335
335
|
</block>
|
|
336
336
|
</sequence>
|
|
337
337
|
|
|
@@ -340,12 +340,12 @@ Step 5 Status: COMPLETED - Graph completion marker written to ${output_dir}/${ma
|
|
|
340
340
|
<block type="gateway" id="G6" mode="exclusive" desc="Determine result status">
|
|
341
341
|
<branch test="${success} == true" name="Success">
|
|
342
342
|
<block type="event" id="E6a" action="log" level="info" desc="Log success">
|
|
343
|
-
Step 6 Status: COMPLETED - Graph construction success: Generated graph data with ${node_count} nodes and ${edge_count} edges
|
|
343
|
+
<field name="message">Step 6 Status: COMPLETED - Graph construction success: Generated graph data with ${node_count} nodes and ${edge_count} edges</field>
|
|
344
344
|
</block>
|
|
345
345
|
</branch>
|
|
346
346
|
<branch test="${success} == false" name="Failure">
|
|
347
347
|
<block type="event" id="E6b" action="log" level="error" desc="Log failure">
|
|
348
|
-
Step 6 Status: COMPLETED - Graph construction failed: ${error_message}
|
|
348
|
+
<field name="message">Step 6 Status: COMPLETED - Graph construction failed: ${error_message}</field>
|
|
349
349
|
</block>
|
|
350
350
|
</branch>
|
|
351
351
|
</block>
|
|
@@ -99,7 +99,6 @@ Stage 4: System Summary
|
|
|
99
99
|
## XML Workflow Definition
|
|
100
100
|
|
|
101
101
|
<workflow id="bizs-dispatch-main" status="pending" version="1.0" desc="bizs knowledge base generation 5-stage pipeline">
|
|
102
|
-
> **REQUIRED**: Before executing this workflow, read the XML workflow specification: `docs/rules/xml-workflow-spec.md`
|
|
103
102
|
|
|
104
103
|
<!-- ============================================================
|
|
105
104
|
Input Parameters Definition
|
|
@@ -187,7 +186,7 @@ Stage 4: System Summary
|
|
|
187
186
|
<field name="message">Skipping empty directory: ${module.name}</field>
|
|
188
187
|
</block>
|
|
189
188
|
<block type="event" id="S0-E1" action="log" level="info" desc="Log backend module">
|
|
190
|
-
Discovered backend module: ${module.name} → Platform type: backend-${module.business_name}
|
|
189
|
+
<field name="message">Discovered backend module: ${module.name} → Platform type: backend-${module.business_name}</field>
|
|
191
190
|
</block>
|
|
192
191
|
</block>
|
|
193
192
|
|
|
@@ -200,7 +199,7 @@ Discovered backend module: ${module.name} → Platform type: backend-${module.bu
|
|
|
200
199
|
<field name="message">Skipping non-frontend directory: ${frontend.name}</field>
|
|
201
200
|
</block>
|
|
202
201
|
<block type="event" id="S0-E2" action="log" level="info" desc="Log frontend platform">
|
|
203
|
-
Discovered frontend platform: ${frontend.name} → Tech stack: Vue/React/UniApp
|
|
202
|
+
<field name="message">Discovered frontend platform: ${frontend.name} → Tech stack: Vue/React/UniApp</field>
|
|
204
203
|
</block>
|
|
205
204
|
</block>
|
|
206
205
|
|
|
@@ -229,10 +228,14 @@ Detected ${platforms.length} platforms:
|
|
|
229
228
|
Continue with knowledge base generation?
|
|
230
229
|
</field>
|
|
231
230
|
<on-confirm>
|
|
232
|
-
<block type="event" action="log" level="info" desc="User confirmed">
|
|
231
|
+
<block type="event" action="log" level="info" desc="User confirmed">
|
|
232
|
+
<field name="message">User confirmed platform list, continuing</field>
|
|
233
|
+
</block>
|
|
233
234
|
</on-confirm>
|
|
234
235
|
<on-cancel>
|
|
235
|
-
<block type="event" action="log" level="warn" desc="User cancelled">
|
|
236
|
+
<block type="event" action="log" level="warn" desc="User cancelled">
|
|
237
|
+
<field name="message">User cancelled, terminating workflow</field>
|
|
238
|
+
</block>
|
|
236
239
|
<field name="workflow.status" value="cancelled"/>
|
|
237
240
|
</on-cancel>
|
|
238
241
|
</block>
|
|
@@ -244,7 +247,7 @@ Continue with knowledge base generation?
|
|
|
244
247
|
</block>
|
|
245
248
|
|
|
246
249
|
<block type="event" id="S0-E4" action="log" level="info" desc="Report detected platform list">
|
|
247
|
-
Detected ${platforms.length} platforms: ${platforms.names}
|
|
250
|
+
<field name="message">Detected ${platforms.length} platforms: ${platforms.names}</field>
|
|
248
251
|
</block>
|
|
249
252
|
</sequence>
|
|
250
253
|
|
|
@@ -314,7 +317,7 @@ Detected ${platforms.length} platforms: ${platforms.names}
|
|
|
314
317
|
</block>
|
|
315
318
|
|
|
316
319
|
<block type="event" id="S1b-E1" action="log" level="info" desc="Report Feature inventory statistics">
|
|
317
|
-
Feature inventory initialized. ${feature_count} features across ${platform_count} platforms
|
|
320
|
+
<field name="message">Feature inventory initialized. ${feature_count} features across ${platform_count} platforms.</field>
|
|
318
321
|
</block>
|
|
319
322
|
</sequence>
|
|
320
323
|
|
|
@@ -344,11 +347,11 @@ Feature inventory initialized. ${feature_count} features across ${platform_count
|
|
|
344
347
|
|
|
345
348
|
<!-- Step 2: Report merge result -->
|
|
346
349
|
<block type="event" id="S1c-E1" action="log" level="info" desc="Report merge result">
|
|
347
|
-
Feature merge complete:
|
|
350
|
+
<field name="message">Feature merge complete:
|
|
348
351
|
- Added: ${merge_result.added}
|
|
349
352
|
- Removed: ${merge_result.removed}
|
|
350
353
|
- Changed: ${merge_result.changed} (reset for re-analysis)
|
|
351
|
-
- Unchanged: ${merge_result.unchanged} (analysis state preserved)
|
|
354
|
+
- Unchanged: ${merge_result.unchanged} (analysis state preserved)</field>
|
|
352
355
|
</block>
|
|
353
356
|
|
|
354
357
|
<!-- Step 3: Mark stale Features -->
|
|
@@ -362,7 +365,7 @@ Feature merge complete:
|
|
|
362
365
|
</branch>
|
|
363
366
|
<branch default="true" name="Full mode">
|
|
364
367
|
<block type="event" id="S1c-E2" action="log" level="info" desc="Full mode skip merge">
|
|
365
|
-
Full mode, skipping Feature merge step
|
|
368
|
+
<field name="message">Full mode, skipping Feature merge step</field>
|
|
366
369
|
</block>
|
|
367
370
|
</branch>
|
|
368
371
|
</block>
|
|
@@ -418,7 +421,7 @@ Full mode, skipping Feature merge step
|
|
|
418
421
|
<block type="gateway" id="S2-G0" mode="exclusive" desc="Determine batch response">
|
|
419
422
|
<branch test="${batch_response.action} == 'done'" name="All Features processed">
|
|
420
423
|
<block type="event" id="S2-E-Done" action="log" level="info" desc="All Features processed">
|
|
421
|
-
All Features analyzed, exiting Stage 2 loop
|
|
424
|
+
<field name="message">All Features analyzed, exiting Stage 2 loop</field>
|
|
422
425
|
</block>
|
|
423
426
|
<field name="stage2_complete" value="true"/>
|
|
424
427
|
</branch>
|
|
@@ -426,7 +429,7 @@ All Features analyzed, exiting Stage 2 loop
|
|
|
426
429
|
|
|
427
430
|
<!-- Step 2: Prepare analysis task specifications -->
|
|
428
431
|
<block type="event" id="S2-E-Batch" action="log" level="info" desc="Report current batch">
|
|
429
|
-
Processing batch: ${batch_response.batch.length} Features
|
|
432
|
+
<field name="message">Processing batch: ${batch_response.batch.length} Features</field>
|
|
430
433
|
</block>
|
|
431
434
|
|
|
432
435
|
<!-- Step 2: Dispatch Worker for each Feature -->
|
|
@@ -508,7 +511,7 @@ Requirements:
|
|
|
508
511
|
|
|
509
512
|
<!-- Step 2.5: Graph Worker Task Preparation -->
|
|
510
513
|
<block type="event" id="S2-E-Graph" action="log" level="info" desc="Prepare Graph Worker tasks">
|
|
511
|
-
Preparing Graph data generation for completed Features
|
|
514
|
+
<field name="message">Preparing Graph data generation for completed Features</field>
|
|
512
515
|
</block>
|
|
513
516
|
|
|
514
517
|
<!-- Step 2.5: Dispatch Graph Worker -->
|
|
@@ -589,7 +592,7 @@ Requirements:
|
|
|
589
592
|
</block>
|
|
590
593
|
|
|
591
594
|
<block type="event" id="S2-E-Result" action="log" level="info" desc="Report batch processing result">
|
|
592
|
-
Batch processing complete: ${batch_result.success} succeeded, ${batch_result.failed} failed
|
|
595
|
+
<field name="message">Batch processing complete: ${batch_result.success} succeeded, ${batch_result.failed} failed</field>
|
|
593
596
|
</block>
|
|
594
597
|
</branch>
|
|
595
598
|
</block>
|
|
@@ -601,7 +604,7 @@ Batch processing complete: ${batch_result.success} succeeded, ${batch_result.fai
|
|
|
601
604
|
</block>
|
|
602
605
|
|
|
603
606
|
<block type="event" id="S2-E-Final" action="log" level="info" desc="Stage 2 complete">
|
|
604
|
-
Stage 2 Milestone: Feature analysis complete. ${analyzed_count} features analyzed, ${failed_count} failed. ${graph_count} graph data files generated
|
|
607
|
+
<field name="message">Stage 2 Milestone: Feature analysis complete. ${analyzed_count} features analyzed, ${failed_count} failed. ${graph_count} graph data files generated.</field>
|
|
605
608
|
</block>
|
|
606
609
|
</sequence>
|
|
607
610
|
|
|
@@ -665,7 +668,7 @@ Requirements:
|
|
|
665
668
|
</block>
|
|
666
669
|
|
|
667
670
|
<block type="event" id="S3-E1" action="log" level="info" desc="Stage 3 complete">
|
|
668
|
-
Stage 3 Milestone: Module summaries complete. ${module_count} modules summarized
|
|
671
|
+
<field name="message">Stage 3 Milestone: Module summaries complete. ${module_count} modules summarized.</field>
|
|
669
672
|
</block>
|
|
670
673
|
</sequence>
|
|
671
674
|
|
|
@@ -710,14 +713,14 @@ Requirements:
|
|
|
710
713
|
</branch>
|
|
711
714
|
<branch default="true" name="Non-UI platform">
|
|
712
715
|
<block type="event" id="S35-E1" action="log" level="info" desc="Backend platform skip style extraction">
|
|
713
|
-
Backend platform ${platform.platformId} skipping UI style extraction
|
|
716
|
+
<field name="message">Backend platform ${platform.platformId} skipping UI style extraction</field>
|
|
714
717
|
</block>
|
|
715
718
|
</branch>
|
|
716
719
|
</block>
|
|
717
720
|
</block>
|
|
718
721
|
|
|
719
722
|
<block type="event" id="S35-E2" action="log" level="info" desc="Stage 3.5 complete">
|
|
720
|
-
Stage 3.5 Milestone: UI style patterns extracted. ${pattern_count} patterns extracted from ${frontend_platform_count} platforms
|
|
723
|
+
<field name="message">Stage 3.5 Milestone: UI style patterns extracted. ${pattern_count} patterns extracted from ${frontend_platform_count} platforms.</field>
|
|
721
724
|
</block>
|
|
722
725
|
</sequence>
|
|
723
726
|
|
|
@@ -767,7 +770,7 @@ Requirements:
|
|
|
767
770
|
</block>
|
|
768
771
|
|
|
769
772
|
<block type="event" id="S4-E1" action="log" level="info" desc="Stage 4 complete">
|
|
770
|
-
Stage 4 Milestone: System overview generated. All stages complete. Pipeline finished successfully
|
|
773
|
+
<field name="message">Stage 4 Milestone: System overview generated. All stages complete. Pipeline finished successfully.</field>
|
|
771
774
|
</block>
|
|
772
775
|
</sequence>
|
|
773
776
|
|
|
@@ -780,7 +783,7 @@ Stage 4 Milestone: System overview generated. All stages complete. Pipeline fini
|
|
|
780
783
|
</try>
|
|
781
784
|
<catch on="worker_failed">
|
|
782
785
|
<block type="event" id="EH1-E1" action="log" level="warn" desc="Worker failed, log error and continue">
|
|
783
|
-
Worker ${error.worker} failed: ${error.message}
|
|
786
|
+
<field name="message">Worker ${error.worker} failed: ${error.message}</field>
|
|
784
787
|
</block>
|
|
785
788
|
<block type="task" id="EH1-B1" action="run-script" desc="Update failed status">
|
|
786
789
|
<field name="command">node "${ide_skills_dir}/speccrew-knowledge-bizs-dispatch/scripts/update-feature-status.js"</field>
|
|
@@ -794,15 +797,15 @@ Worker ${error.worker} failed: ${error.message}
|
|
|
794
797
|
</catch>
|
|
795
798
|
<catch on="script_error">
|
|
796
799
|
<block type="event" id="EH1-E2" action="log" level="error" desc="Script execution failed">
|
|
797
|
-
Script ${error.script} execution failed: ${error.message}
|
|
800
|
+
<field name="message">Script ${error.script} execution failed: ${error.message}</field>
|
|
798
801
|
</block>
|
|
799
802
|
</catch>
|
|
800
803
|
<catch on="stage_abort">
|
|
801
804
|
<block type="event" id="EH1-E3" action="log" level="error" desc="Stage aborted">
|
|
802
|
-
Stage ${error.stage} execution aborted: ${error.message}
|
|
805
|
+
<field name="message">Stage ${error.stage} execution aborted: ${error.message}</field>
|
|
803
806
|
</block>
|
|
804
807
|
<block type="event" id="EH1-E4" action="log" level="warn" desc="High failure rate">
|
|
805
|
-
Failure rate exceeds 50%, terminating entire pipeline
|
|
808
|
+
<field name="message">Failure rate exceeds 50%, terminating entire pipeline</field>
|
|
806
809
|
</block>
|
|
807
810
|
</catch>
|
|
808
811
|
</block>
|
|
@@ -824,41 +827,11 @@ Failure rate exceeds 50%, terminating entire pipeline
|
|
|
824
827
|
|
|
825
828
|
---
|
|
826
829
|
|
|
827
|
-
##
|
|
828
|
-
|
|
829
|
-
### Input Parameters
|
|
830
|
-
|
|
831
|
-
| Variable | Description | Default |
|
|
832
|
-
|----------|-------------|---------|
|
|
833
|
-
| `source_path` | Source code path (can be a subdirectory; auto-detects platform root by traversing upward) | project root |
|
|
834
|
-
| `language` | User's language code (e.g., "zh", "en") | **REQUIRED** |
|
|
835
|
-
| `sync_mode` | `"full"` or `"incremental"` | `"full"` |
|
|
836
|
-
| `base_commit` | (incremental only) Git base commit hash | — |
|
|
837
|
-
| `head_commit` | (incremental only) Git HEAD commit hash | `HEAD` |
|
|
838
|
-
| `changed_files` | (incremental only) Pre-computed changed file list | — |
|
|
839
|
-
| `max_concurrent_workers` | Maximum parallel Worker Agents | `5` |
|
|
840
|
-
| `workspace_path` | **(required)** Absolute path to speccrew-workspace directory | — |
|
|
841
|
-
| `sync_state_bizs_dir` | **(required)** Absolute path to `knowledges/base/sync-state/knowledge-bizs/` | — |
|
|
842
|
-
| `ide_skills_dir` | **(required)** Absolute path to IDE skills directory (e.g., `.qoder/skills`, `.cursor/skills`) | — |
|
|
843
|
-
| `configs_dir` | **(required)** Absolute path to `docs/configs/` directory | — |
|
|
844
|
-
| `graph_root` | Graph data output root path (absolute path preferred) | `{workspace_path}/knowledges/bizs/graph` |
|
|
845
|
-
| `completed_dir` | **(required)** Marker file output directory for Worker results (absolute path required) | — |
|
|
846
|
-
|
|
847
|
-
> **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.
|
|
848
|
-
|
|
849
|
-
### Output Files
|
|
850
|
-
|
|
851
|
-
- Entry directories: `{sync_state_bizs_dir}/entry-dirs-{platform}.json`
|
|
852
|
-
- Feature inventory: `{sync_state_bizs_dir}/features-{platform}.json`
|
|
853
|
-
- Feature docs: `{workspace_path}/knowledges/bizs/{platform}/{module}/features/*.md`
|
|
854
|
-
- Module overviews: `{workspace_path}/knowledges/bizs/{platform}/{module}/*-overview.md`
|
|
855
|
-
- UI style patterns: `{workspace_path}/knowledges/techs/{platform_id}/ui-style-patterns/` (page-types/, components/, layouts/)
|
|
856
|
-
- System overview: `{workspace_path}/knowledges/bizs/system-overview.md`
|
|
857
|
-
- Graph data: `{workspace_path}/knowledges/bizs/graph/`
|
|
830
|
+
## Appendix: Reference
|
|
858
831
|
|
|
859
|
-
|
|
832
|
+
### Skill Routing Table (Stage 2)
|
|
860
833
|
|
|
861
|
-
|
|
834
|
+
> **Note**: Detailed routing logic is defined in XML Stage 2 gateway (S2-G1).
|
|
862
835
|
|
|
863
836
|
| platformType | skill_name | Description |
|
|
864
837
|
|--------------|------------|-------------|
|
|
@@ -867,11 +840,9 @@ Failure rate exceeds 50%, terminating entire pipeline
|
|
|
867
840
|
| `desktop` | `speccrew-knowledge-bizs-ui-analyze-xml` | Desktop apps (Electron/WPF) |
|
|
868
841
|
| `backend` | `speccrew-knowledge-bizs-api-analyze-xml` | Backend APIs (Java/Python/Node.js) |
|
|
869
842
|
|
|
870
|
-
> **CRITICAL**: Use this routing table to select the correct skill for each feature.
|
|
871
|
-
|
|
872
843
|
---
|
|
873
844
|
|
|
874
|
-
|
|
845
|
+
### Platform Types
|
|
875
846
|
|
|
876
847
|
| Platform Type | Platform Subtype | Description |
|
|
877
848
|
|---------------|------------------|-------------|
|
|
@@ -882,9 +853,9 @@ Failure rate exceeds 50%, terminating entire pipeline
|
|
|
882
853
|
|
|
883
854
|
---
|
|
884
855
|
|
|
885
|
-
|
|
856
|
+
### Worker Completion Marker Format
|
|
886
857
|
|
|
887
|
-
|
|
858
|
+
#### Marker File Naming Convention
|
|
888
859
|
|
|
889
860
|
**Pattern**: `{module}-{subpath}-{fileName}.{type}.json`
|
|
890
861
|
|
|
@@ -903,7 +874,7 @@ Failure rate exceeds 50%, terminating entire pipeline
|
|
|
903
874
|
| `user/admin/UserController.java` | `user-admin-UserController.done.json` |
|
|
904
875
|
| `order/api/v2/OrderService.java` | `order-api-v2-OrderService.done.json` |
|
|
905
876
|
|
|
906
|
-
|
|
877
|
+
#### .done.json Required Fields
|
|
907
878
|
|
|
908
879
|
```json
|
|
909
880
|
{
|
|
@@ -921,9 +892,9 @@ Failure rate exceeds 50%, terminating entire pipeline
|
|
|
921
892
|
|
|
922
893
|
---
|
|
923
894
|
|
|
924
|
-
|
|
895
|
+
### Batch Processing Details
|
|
925
896
|
|
|
926
|
-
|
|
897
|
+
#### get-batch Script Output Format
|
|
927
898
|
|
|
928
899
|
```json
|
|
929
900
|
{
|
|
@@ -944,7 +915,7 @@ Failure rate exceeds 50%, terminating entire pipeline
|
|
|
944
915
|
}
|
|
945
916
|
```
|
|
946
917
|
|
|
947
|
-
|
|
918
|
+
#### process-results Script Behavior
|
|
948
919
|
|
|
949
920
|
- Scans `.done.json` files → updates feature status to `completed` in features-*.json
|
|
950
921
|
- Scans `.graph-done.json` files → confirms graph data generation complete
|
|
@@ -953,128 +924,14 @@ Failure rate exceeds 50%, terminating entire pipeline
|
|
|
953
924
|
|
|
954
925
|
---
|
|
955
926
|
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
Dispatch adopts a fully stateless file-driven design. If context compression or interruption occurs during execution:
|
|
959
|
-
|
|
960
|
-
- No need to memorize any batch state or Worker output
|
|
961
|
-
- Re-execute loop: `get-batch` will automatically recover from file state, skipping completed and in-progress features
|
|
962
|
-
- `process-results` will process all uncleaned marker files
|
|
963
|
-
- The entire flow is safely re-entrant
|
|
964
|
-
|
|
965
|
-
---
|
|
966
|
-
|
|
967
|
-
## Large-Scale Scenario Guidance
|
|
968
|
-
|
|
969
|
-
When modules contain **more than 20 Features**:
|
|
927
|
+
### Stateless Design
|
|
970
928
|
|
|
971
|
-
|
|
972
|
-
- **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.
|
|
973
|
-
- **Resume Support**: The `get-next-batch` script naturally supports resume across sessions — it skips features that already have `.done` files.
|
|
974
|
-
- **Validation After Completion**: After all features are marked `analyzed=true`, run `process-batch-results` with `--validateDocs --syncStatePath` to verify document completeness.
|
|
929
|
+
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.
|
|
975
930
|
|
|
976
931
|
---
|
|
977
932
|
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
| Stage | Failure Scenario | Handling | Retry |
|
|
981
|
-
|-------|-----------------|----------|-------|
|
|
982
|
-
| Stage 0 | Platform detection fails | Abort pipeline, report error | No retry |
|
|
983
|
-
| Stage 1a | Entry directory recognition fails | Abort pipeline, report platform details | No retry |
|
|
984
|
-
| Stage 1b | Script execution fails | Abort pipeline, report error | No retry |
|
|
985
|
-
| Stage 1c | Feature merge fails | Abort pipeline, do not proceed to Stage 2 until resolved | No retry |
|
|
986
|
-
| Stage 2 | Single Worker fails | Mark feature as `failed`, continue other Workers | No auto-retry |
|
|
987
|
-
| Stage 2 | Failure rate > 50% | Abort pipeline, report all failures | — |
|
|
988
|
-
| Stage 3 | Single Worker fails | Skip that module, continue others | Retry once |
|
|
989
|
-
| Stage 3.5 | Pattern extraction fails | Continue pipeline, report warning | — |
|
|
990
|
-
| Stage 4 | Worker fails | Abort, preserve all generated content | Retry once |
|
|
991
|
-
|
|
992
|
-
**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.
|
|
993
|
-
|
|
994
|
-
---
|
|
995
|
-
|
|
996
|
-
## Task Completion Report Format
|
|
997
|
-
|
|
998
|
-
Upon completing all stages, output the following structured report:
|
|
999
|
-
|
|
1000
|
-
```json
|
|
1001
|
-
{
|
|
1002
|
-
"status": "success | partial | failed",
|
|
1003
|
-
"skill": "speccrew-knowledge-bizs-dispatch-xml",
|
|
1004
|
-
"stages_completed": ["stage_0", "stage_1a", "stage_1b", "stage_1c", "stage_2", "stage_3", "stage_3.5", "stage_4"],
|
|
1005
|
-
"stages_failed": [],
|
|
1006
|
-
"output_summary": {
|
|
1007
|
-
"platforms_processed": ["web-vue", "backend-system"],
|
|
1008
|
-
"features_analyzed": 32,
|
|
1009
|
-
"modules_summarized": 8,
|
|
1010
|
-
"ui_patterns_extracted": 15,
|
|
1011
|
-
"system_overview_generated": true
|
|
1012
|
-
},
|
|
1013
|
-
"output_files": [
|
|
1014
|
-
"knowledges/bizs/{platform}/{module}/features/*.md",
|
|
1015
|
-
"knowledges/bizs/{platform}/{module}/*-overview.md",
|
|
1016
|
-
"knowledges/techs/{platform_id}/ui-style-patterns/",
|
|
1017
|
-
"knowledges/bizs/system-overview.md",
|
|
1018
|
-
"knowledges/bizs/graph/"
|
|
1019
|
-
],
|
|
1020
|
-
"errors": [],
|
|
1021
|
-
"next_steps": ["Initialize techs knowledge base"]
|
|
1022
|
-
}
|
|
1023
|
-
```
|
|
1024
|
-
|
|
1025
|
-
---
|
|
1026
|
-
|
|
1027
|
-
## Return Value Structure
|
|
1028
|
-
|
|
1029
|
-
After all 5 stages complete, return a summary object to the caller:
|
|
1030
|
-
|
|
1031
|
-
```json
|
|
1032
|
-
{
|
|
1033
|
-
"status": "completed",
|
|
1034
|
-
"pipeline": "bizs",
|
|
1035
|
-
"stages": {
|
|
1036
|
-
"stage0": { "status": "completed", "platforms": 2 },
|
|
1037
|
-
"stage1a": { "status": "completed", "platforms": 2, "modules": 12 },
|
|
1038
|
-
"stage1b": { "status": "completed", "platforms": 2, "features": 32 },
|
|
1039
|
-
"stage1c": { "status": "completed", "mode": "full" },
|
|
1040
|
-
"stage2": { "status": "completed", "analyzed": 32, "failed": 0, "graphWritten": 32 },
|
|
1041
|
-
"stage3": { "status": "completed", "modules": 8, "failed": 0 },
|
|
1042
|
-
"stage3_5": { "status": "completed", "platforms": 2, "patterns": 15 },
|
|
1043
|
-
"stage4": { "status": "completed" }
|
|
1044
|
-
},
|
|
1045
|
-
"output": {
|
|
1046
|
-
"system_overview": "{workspace_path}/knowledges/bizs/system-overview.md",
|
|
1047
|
-
"graph_root": "{workspace_path}/knowledges/bizs/graph/"
|
|
1048
|
-
}
|
|
1049
|
-
}
|
|
1050
|
-
```
|
|
1051
|
-
|
|
1052
|
-
---
|
|
1053
|
-
|
|
1054
|
-
## CONTINUOUS EXECUTION RULES
|
|
1055
|
-
|
|
1056
|
-
This skill MUST execute all stages continuously without unnecessary interruptions.
|
|
1057
|
-
|
|
1058
|
-
### FORBIDDEN Interruptions
|
|
1059
|
-
|
|
1060
|
-
1. DO NOT ask user "Should I continue?" after completing a stage
|
|
1061
|
-
2. DO NOT suggest "Let me split this into batches" or "Let's do this in parts"
|
|
1062
|
-
3. DO NOT pause to list what you plan to do next — just do it
|
|
1063
|
-
4. DO NOT ask for confirmation before generating output files
|
|
1064
|
-
5. DO NOT warn about "large number of files" — proceed with generation
|
|
1065
|
-
6. DO NOT offer "Should I proceed with the remaining items?"
|
|
1066
|
-
7. DO NOT present options like "Full execution / Sample execution / Pause"
|
|
1067
|
-
|
|
1068
|
-
### When to Pause (ONLY these cases)
|
|
933
|
+
### Large-Scale Scenario Guidance
|
|
1069
934
|
|
|
1070
|
-
|
|
1071
|
-
2. Ambiguous requirements that genuinely need clarification
|
|
1072
|
-
3. Unrecoverable errors that prevent further progress (failure rate > 50%)
|
|
1073
|
-
4. Security-sensitive operations (e.g., deleting existing files)
|
|
935
|
+
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.
|
|
1074
936
|
|
|
1075
|
-
### Batch Execution Behavior
|
|
1076
937
|
|
|
1077
|
-
- When multiple features need processing, process ALL of them sequentially without asking
|
|
1078
|
-
- Use marker files (.done.json) to track progress, enabling resumption if interrupted by context limits
|
|
1079
|
-
- If context window is approaching limit, save progress to checkpoint and inform user how to resume
|
|
1080
|
-
- NEVER voluntarily stop mid-batch to ask if user wants to continue
|
|
@@ -166,7 +166,9 @@ For each platform, generates:
|
|
|
166
166
|
<branch test="${validation_result.status} == 'failed'">
|
|
167
167
|
<block type="error-handler" id="EH1" desc="Handle validation failure">
|
|
168
168
|
<catch error-type="validation_failed">
|
|
169
|
-
<block type="event" id="E1" action="log" level="warn" desc="Log validation failure">
|
|
169
|
+
<block type="event" id="E1" action="log" level="warn" desc="Log validation failure">
|
|
170
|
+
<field name="message">Entry directory recognition failed for platform ${platform.platformId}</field>
|
|
171
|
+
</block>
|
|
170
172
|
<block type="task" id="B7" action="analyze" desc="Re-analyze the directory tree due to validation failure">
|
|
171
173
|
<field name="input" value="${directory_tree}"/>
|
|
172
174
|
<field name="output" var="re_analyzed_entries"/>
|
|
@@ -175,7 +177,9 @@ For each platform, generates:
|
|
|
175
177
|
</block>
|
|
176
178
|
</branch>
|
|
177
179
|
<branch test="${validation_result.status} == 'passed'">
|
|
178
|
-
<block type="event" id="E2" action="log" level="info" desc="Log validation success">
|
|
180
|
+
<block type="event" id="E2" action="log" level="info" desc="Log validation success">
|
|
181
|
+
<field name="message">Platform ${platform.platformId} entry-dirs validation passed</field>
|
|
182
|
+
</block>
|
|
179
183
|
</branch>
|
|
180
184
|
</block>
|
|
181
185
|
|
|
@@ -133,7 +133,7 @@ Analyze one specific UI feature from source code, extract business functionality
|
|
|
133
133
|
<block type="gateway" id="G0" mode="exclusive" desc="Check analyzed status">
|
|
134
134
|
<branch test="${analyzed} == true" name="Already analyzed">
|
|
135
135
|
<block type="event" id="E0a" action="log" level="info" desc="Skip already analyzed feature">
|
|
136
|
-
Step 0 Status: SKIPPED (already analyzed)
|
|
136
|
+
<field name="message">Step 0 Status: SKIPPED (already analyzed)</field>
|
|
137
137
|
</block>
|
|
138
138
|
<block type="output" id="O0a" desc="Skip output">
|
|
139
139
|
<field name="status" value="skipped"/>
|
|
@@ -145,7 +145,7 @@ Step 0 Status: SKIPPED (already analyzed)
|
|
|
145
145
|
</branch>
|
|
146
146
|
<branch test="${analyzed} == false" name="Proceed with analysis">
|
|
147
147
|
<block type="event" id="E0b" action="log" level="info" desc="Proceed with analysis">
|
|
148
|
-
Step 0 Status: PROCEEDING (analysis required)
|
|
148
|
+
<field name="message">Step 0 Status: PROCEEDING (analysis required)</field>
|
|
149
149
|
</block>
|
|
150
150
|
</branch>
|
|
151
151
|
</block>
|
|
@@ -183,7 +183,7 @@ Step 0 Status: PROCEEDING (analysis required)
|
|
|
183
183
|
<field name="verify" value="${templateContent} != null AND ${templateContent} != ''"/>
|
|
184
184
|
</block>
|
|
185
185
|
<block type="event" id="E1" action="log" level="info" desc="Log template read">
|
|
186
|
-
Step 1 Status: COMPLETED - Read template for ${platform_type}/${platform_subtype}
|
|
186
|
+
<field name="message">Step 1 Status: COMPLETED - Read template for ${platform_type}/${platform_subtype}</field>
|
|
187
187
|
</block>
|
|
188
188
|
</sequence>
|
|
189
189
|
|
|
@@ -211,7 +211,7 @@ Step 1 Status: COMPLETED - Read template for ${platform_type}/${platform_subtype
|
|
|
211
211
|
<field name="verify" value="${sourceContent} != null"/>
|
|
212
212
|
</block>
|
|
213
213
|
<block type="event" id="E2" action="log" level="info" desc="Log source analysis">
|
|
214
|
-
Step 2 Status: COMPLETED - Read ${sourcePath}, Analyzed ${componentCount} components, ${eventCount} events
|
|
214
|
+
<field name="message">Step 2 Status: COMPLETED - Read ${sourcePath}, Analyzed ${componentCount} components, ${eventCount} events</field>
|
|
215
215
|
</block>
|
|
216
216
|
</sequence>
|
|
217
217
|
|
|
@@ -251,7 +251,7 @@ Step 2 Status: COMPLETED - Read ${sourcePath}, Analyzed ${componentCount} compon
|
|
|
251
251
|
<field name="verify" value="${flows.length} > 0 OR ${wireframes.length} > 0"/>
|
|
252
252
|
</block>
|
|
253
253
|
<block type="event" id="E3" action="log" level="info" desc="Log feature extraction">
|
|
254
|
-
Step 3 Status: COMPLETED - Extracted ${wireframes.length} wireframes, ${flows.length} business flows
|
|
254
|
+
<field name="message">Step 3 Status: COMPLETED - Extracted ${wireframes.length} wireframes, ${flows.length} business flows</field>
|
|
255
255
|
</block>
|
|
256
256
|
</sequence>
|
|
257
257
|
|
|
@@ -277,7 +277,7 @@ Step 3 Status: COMPLETED - Extracted ${wireframes.length} wireframes, ${flows.le
|
|
|
277
277
|
</block>
|
|
278
278
|
|
|
279
279
|
<block type="event" id="E4" action="log" level="info" desc="Log reference search">
|
|
280
|
-
Step 4 Status: COMPLETED - Found ${referencingPages.length} referencing pages
|
|
280
|
+
<field name="message">Step 4 Status: COMPLETED - Found ${referencingPages.length} referencing pages</field>
|
|
281
281
|
</block>
|
|
282
282
|
</sequence>
|
|
283
283
|
|
|
@@ -301,7 +301,7 @@ Step 4 Status: COMPLETED - Found ${referencingPages.length} referencing pages
|
|
|
301
301
|
<field name="verify" value="file.exists(${documentPath})"/>
|
|
302
302
|
</block>
|
|
303
303
|
<block type="event" id="E5a" action="log" level="info" desc="Log template copy">
|
|
304
|
-
Step 5a Status: COMPLETED - Template copied to ${documentPath}
|
|
304
|
+
<field name="message">Step 5a Status: COMPLETED - Template copied to ${documentPath}</field>
|
|
305
305
|
</block>
|
|
306
306
|
</sequence>
|
|
307
307
|
|
|
@@ -367,14 +367,14 @@ Step 5a Status: COMPLETED - Template copied to ${documentPath}
|
|
|
367
367
|
<field name="verify" value="all.sections.filled"/>
|
|
368
368
|
</block>
|
|
369
369
|
<block type="event" id="E5b" action="log" level="info" desc="Log section filling">
|
|
370
|
-
Step 5b Status: COMPLETED - All sections filled using search_replace
|
|
370
|
+
<field name="message">Step 5b Status: COMPLETED - All sections filled using search_replace</field>
|
|
371
371
|
</block>
|
|
372
372
|
</sequence>
|
|
373
373
|
|
|
374
374
|
<!-- ==================== STEP 6: REPORT RESULTS ==================== -->
|
|
375
375
|
<sequence id="S6" name="Step 6: Report Results" status="pending" desc="Report analysis results">
|
|
376
376
|
<block type="event" id="E6" action="log" level="info" desc="Log final status">
|
|
377
|
-
Step 6 Status: COMPLETED - Analysis success: Successfully analyzed ${fileName} feature from ${sourcePath}
|
|
377
|
+
<field name="message">Step 6 Status: COMPLETED - Analysis success: Successfully analyzed ${fileName} feature from ${sourcePath}</field>
|
|
378
378
|
</block>
|
|
379
379
|
</sequence>
|
|
380
380
|
|
|
@@ -395,28 +395,28 @@ Step 6 Status: COMPLETED - Analysis success: Successfully analyzed ${fileName} f
|
|
|
395
395
|
</try>
|
|
396
396
|
<catch error-type="file-not-found">
|
|
397
397
|
<block type="event" id="EH1-E1" action="log" level="error" desc="File not found error">
|
|
398
|
-
Source file not found: ${sourcePath}
|
|
398
|
+
<field name="message">Source file not found: ${sourcePath}</field>
|
|
399
399
|
</block>
|
|
400
400
|
<field name="status" value="failed"/>
|
|
401
401
|
<field name="message" value="Source file not found: ${sourcePath}"/>
|
|
402
402
|
</catch>
|
|
403
403
|
<catch error-type="template-error">
|
|
404
404
|
<block type="event" id="EH1-E2" action="log" level="error" desc="Template error">
|
|
405
|
-
Template processing error
|
|
405
|
+
<field name="message">Template processing error</field>
|
|
406
406
|
</block>
|
|
407
407
|
<field name="status" value="failed"/>
|
|
408
408
|
<field name="message" value="Failed to process template"/>
|
|
409
409
|
</catch>
|
|
410
410
|
<catch error-type="validation-error">
|
|
411
411
|
<block type="event" id="EH1-E3" action="log" level="error" desc="Validation error">
|
|
412
|
-
Validation failed: ${error.message}
|
|
412
|
+
<field name="message">Validation failed: ${error.message}</field>
|
|
413
413
|
</block>
|
|
414
414
|
<field name="status" value="partial"/>
|
|
415
415
|
<field name="message" value="Analysis completed with validation errors"/>
|
|
416
416
|
</catch>
|
|
417
417
|
<finally>
|
|
418
418
|
<block type="event" id="EH1-E4" action="log" level="info" desc="Workflow completed">
|
|
419
|
-
Workflow execution completed
|
|
419
|
+
<field name="message">Workflow execution completed</field>
|
|
420
420
|
</block>
|
|
421
421
|
</finally>
|
|
422
422
|
</block>
|