speccrew 0.6.68 → 0.7.0

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.
Files changed (134) hide show
  1. package/.speccrew/agents/speccrew-task-worker.md +1 -1
  2. package/.speccrew/agents/speccrew-team-leader.md +336 -189
  3. package/.speccrew/skills/speccrew-agentflow-manager/SKILL.md +161 -0
  4. package/.speccrew/skills/speccrew-agentflow-manager/workflow.agentflow.xml +347 -0
  5. package/.speccrew/skills/speccrew-deploy-build/SKILL.md +3 -56
  6. package/.speccrew/skills/speccrew-deploy-build/workflow.agentflow.xml +125 -0
  7. package/.speccrew/skills/speccrew-deploy-migrate/SKILL.md +3 -64
  8. package/.speccrew/skills/speccrew-deploy-migrate/workflow.agentflow.xml +135 -0
  9. package/.speccrew/skills/speccrew-deploy-smoke-test/SKILL.md +4 -156
  10. package/.speccrew/skills/speccrew-deploy-smoke-test/workflow.agentflow.xml +178 -0
  11. package/.speccrew/skills/speccrew-deploy-startup/SKILL.md +3 -135
  12. package/.speccrew/skills/speccrew-deploy-startup/workflow.agentflow.xml +223 -0
  13. package/.speccrew/skills/speccrew-dev-backend/SKILL.md +10 -2
  14. package/.speccrew/skills/speccrew-dev-backend/workflow.agentflow.xml +254 -0
  15. package/.speccrew/skills/speccrew-dev-desktop-electron/SKILL.md +10 -2
  16. package/.speccrew/skills/speccrew-dev-desktop-electron/workflow.agentflow.xml +259 -0
  17. package/.speccrew/skills/speccrew-dev-desktop-tauri/SKILL.md +10 -2
  18. package/.speccrew/skills/speccrew-dev-desktop-tauri/workflow.agentflow.xml +245 -0
  19. package/.speccrew/skills/speccrew-dev-frontend/SKILL.md +10 -2
  20. package/.speccrew/skills/speccrew-dev-frontend/workflow.agentflow.xml +262 -0
  21. package/.speccrew/skills/speccrew-dev-mobile/SKILL.md +10 -2
  22. package/.speccrew/skills/speccrew-dev-mobile/workflow.agentflow.xml +244 -0
  23. package/.speccrew/skills/speccrew-dev-review-backend/SKILL.md +10 -2
  24. package/.speccrew/skills/speccrew-dev-review-backend/workflow.agentflow.xml +251 -0
  25. package/.speccrew/skills/speccrew-dev-review-desktop/SKILL.md +10 -2
  26. package/.speccrew/skills/speccrew-dev-review-desktop/workflow.agentflow.xml +214 -0
  27. package/.speccrew/skills/speccrew-dev-review-frontend/SKILL.md +10 -2
  28. package/.speccrew/skills/speccrew-dev-review-frontend/workflow.agentflow.xml +213 -0
  29. package/.speccrew/skills/speccrew-dev-review-mobile/SKILL.md +10 -2
  30. package/.speccrew/skills/speccrew-dev-review-mobile/workflow.agentflow.xml +214 -0
  31. package/.speccrew/skills/speccrew-fd-api-contract/SKILL.md +7 -1
  32. package/.speccrew/skills/speccrew-fd-api-contract/workflow.agentflow.xml +222 -0
  33. package/.speccrew/skills/speccrew-fd-feature-analyze/SKILL.md +7 -1
  34. package/.speccrew/skills/speccrew-fd-feature-analyze/workflow.agentflow.xml +223 -0
  35. package/.speccrew/skills/speccrew-fd-feature-design/SKILL.md +7 -1
  36. package/.speccrew/skills/speccrew-fd-feature-design/workflow.agentflow.xml +322 -0
  37. package/.speccrew/skills/speccrew-get-timestamp/SKILL.md +3 -39
  38. package/.speccrew/skills/speccrew-get-timestamp/workflow.agentflow.xml +43 -0
  39. package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/SKILL.md +57 -508
  40. package/.speccrew/skills/{speccrew-knowledge-bizs-api-analyze-xml/SKILL.md → speccrew-knowledge-bizs-api-analyze/workflow.agentflow.xml} +1 -154
  41. package/.speccrew/skills/speccrew-knowledge-bizs-api-graph/SKILL.md +73 -283
  42. package/.speccrew/skills/{speccrew-knowledge-bizs-api-graph-xml/SKILL.md → speccrew-knowledge-bizs-api-graph/workflow.agentflow.xml} +0 -298
  43. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/SKILL.md +931 -801
  44. package/.speccrew/skills/{speccrew-knowledge-bizs-dispatch-xml/SKILL.md → speccrew-knowledge-bizs-dispatch/workflow.agentflow.xml} +42 -272
  45. package/.speccrew/skills/speccrew-knowledge-bizs-identify-entries/SKILL.md +263 -71
  46. package/.speccrew/skills/{speccrew-knowledge-bizs-identify-entries-xml/SKILL.md → speccrew-knowledge-bizs-identify-entries/workflow.agentflow.xml} +8 -184
  47. package/.speccrew/skills/speccrew-knowledge-bizs-init-features/SKILL.md +200 -181
  48. package/.speccrew/skills/{speccrew-knowledge-bizs-init-features-xml/SKILL.md → speccrew-knowledge-bizs-init-features/workflow.agentflow.xml} +7 -134
  49. package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/SKILL.md +5 -89
  50. package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/workflow.agentflow.xml +129 -0
  51. package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/SKILL.md +454 -326
  52. package/.speccrew/skills/{speccrew-knowledge-bizs-ui-analyze-xml/SKILL.md → speccrew-knowledge-bizs-ui-analyze/workflow.agentflow.xml} +8 -128
  53. package/.speccrew/skills/speccrew-knowledge-bizs-ui-graph/SKILL.md +302 -247
  54. package/.speccrew/skills/{speccrew-knowledge-bizs-ui-graph-xml/SKILL.md → speccrew-knowledge-bizs-ui-graph/workflow.agentflow.xml} +7 -199
  55. package/.speccrew/skills/speccrew-knowledge-bizs-ui-style-extract/SKILL.md +267 -156
  56. package/.speccrew/skills/{speccrew-knowledge-bizs-ui-style-extract-xml/SKILL.md → speccrew-knowledge-bizs-ui-style-extract/workflow.agentflow.xml} +7 -151
  57. package/.speccrew/skills/speccrew-knowledge-graph-query/SKILL.md +3 -122
  58. package/.speccrew/skills/speccrew-knowledge-graph-query/workflow.agentflow.xml +106 -0
  59. package/.speccrew/skills/speccrew-knowledge-graph-write/SKILL.md +3 -80
  60. package/.speccrew/skills/speccrew-knowledge-graph-write/workflow.agentflow.xml +152 -0
  61. package/.speccrew/skills/speccrew-knowledge-module-summarize/SKILL.md +371 -265
  62. package/.speccrew/skills/{speccrew-knowledge-module-summarize-xml/SKILL.md → speccrew-knowledge-module-summarize/workflow.agentflow.xml} +7 -197
  63. package/.speccrew/skills/speccrew-knowledge-system-summarize/SKILL.md +45 -333
  64. package/.speccrew/skills/{speccrew-knowledge-system-summarize-xml/SKILL.md → speccrew-knowledge-system-summarize/workflow.agentflow.xml} +0 -177
  65. package/.speccrew/skills/speccrew-knowledge-techs-dispatch/SKILL.md +174 -727
  66. package/.speccrew/skills/{speccrew-knowledge-techs-dispatch-xml/SKILL.md → speccrew-knowledge-techs-dispatch/workflow.agentflow.xml} +10 -351
  67. package/.speccrew/skills/speccrew-knowledge-techs-generate/SKILL.md +20 -150
  68. package/.speccrew/skills/{speccrew-knowledge-techs-generate-xml/SKILL.md → speccrew-knowledge-techs-generate/workflow.agentflow.xml} +0 -169
  69. package/.speccrew/skills/speccrew-knowledge-techs-generate-conventions/SKILL.md +75 -587
  70. package/.speccrew/skills/{speccrew-knowledge-techs-generate-conventions-xml/SKILL.md → speccrew-knowledge-techs-generate-conventions/workflow.agentflow.xml} +0 -153
  71. package/.speccrew/skills/speccrew-knowledge-techs-generate-quality/SKILL.md +463 -297
  72. package/.speccrew/skills/{speccrew-knowledge-techs-generate-quality-xml/SKILL.md → speccrew-knowledge-techs-generate-quality/workflow.agentflow.xml} +0 -164
  73. package/.speccrew/skills/speccrew-knowledge-techs-generate-ui-style/SKILL.md +57 -292
  74. package/.speccrew/skills/{speccrew-knowledge-techs-generate-ui-style-xml/SKILL.md → speccrew-knowledge-techs-generate-ui-style/workflow.agentflow.xml} +2 -193
  75. package/.speccrew/skills/speccrew-knowledge-techs-index/SKILL.md +49 -335
  76. package/.speccrew/skills/{speccrew-knowledge-techs-index-xml/SKILL.md → speccrew-knowledge-techs-index/workflow.agentflow.xml} +0 -167
  77. package/.speccrew/skills/speccrew-knowledge-techs-init/SKILL.md +28 -109
  78. package/.speccrew/skills/{speccrew-knowledge-techs-init-xml/SKILL.md → speccrew-knowledge-techs-init/workflow.agentflow.xml} +0 -189
  79. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/SKILL.md +3 -487
  80. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/workflow.agentflow.xml +278 -0
  81. package/.speccrew/skills/speccrew-pm-knowledge-detector/SKILL.md +3 -71
  82. package/.speccrew/skills/speccrew-pm-knowledge-detector/workflow.agentflow.xml +108 -0
  83. package/.speccrew/skills/speccrew-pm-module-initializer/SKILL.md +3 -107
  84. package/.speccrew/skills/speccrew-pm-module-initializer/workflow.agentflow.xml +139 -0
  85. package/.speccrew/skills/speccrew-pm-module-matcher/SKILL.md +3 -115
  86. package/.speccrew/skills/speccrew-pm-module-matcher/workflow.agentflow.xml +146 -0
  87. package/.speccrew/skills/speccrew-pm-requirement-analysis/SKILL.md +3 -343
  88. package/.speccrew/skills/speccrew-pm-requirement-analysis/workflow.agentflow.xml +174 -0
  89. package/.speccrew/skills/speccrew-pm-requirement-assess/SKILL.md +3 -91
  90. package/.speccrew/skills/speccrew-pm-requirement-assess/workflow.agentflow.xml +173 -0
  91. package/.speccrew/skills/speccrew-pm-requirement-clarify/SKILL.md +3 -224
  92. package/.speccrew/skills/speccrew-pm-requirement-clarify/workflow.agentflow.xml +159 -0
  93. package/.speccrew/skills/speccrew-pm-requirement-model/SKILL.md +3 -275
  94. package/.speccrew/skills/speccrew-pm-requirement-model/workflow.agentflow.xml +210 -0
  95. package/.speccrew/skills/speccrew-pm-requirement-simple/SKILL.md +3 -76
  96. package/.speccrew/skills/speccrew-pm-requirement-simple/workflow.agentflow.xml +120 -0
  97. package/.speccrew/skills/speccrew-pm-sub-prd-generate/SKILL.md +7 -1
  98. package/.speccrew/skills/speccrew-pm-sub-prd-generate/workflow.agentflow.xml +218 -0
  99. package/.speccrew/skills/speccrew-sd-backend/SKILL.md +7 -1
  100. package/.speccrew/skills/speccrew-sd-backend/workflow.agentflow.xml +264 -0
  101. package/.speccrew/skills/speccrew-sd-desktop/SKILL.md +7 -1
  102. package/.speccrew/skills/speccrew-sd-desktop/workflow.agentflow.xml +288 -0
  103. package/.speccrew/skills/speccrew-sd-framework-evaluate/SKILL.md +7 -1
  104. package/.speccrew/skills/speccrew-sd-framework-evaluate/workflow.agentflow.xml +235 -0
  105. package/.speccrew/skills/speccrew-sd-frontend/SKILL.md +7 -1
  106. package/.speccrew/skills/speccrew-sd-frontend/workflow.agentflow.xml +299 -0
  107. package/.speccrew/skills/speccrew-sd-mobile/SKILL.md +7 -1
  108. package/.speccrew/skills/speccrew-sd-mobile/workflow.agentflow.xml +301 -0
  109. package/.speccrew/skills/speccrew-test-case-design/SKILL.md +165 -284
  110. package/.speccrew/skills/speccrew-test-case-design/workflow.agentflow.xml +210 -0
  111. package/.speccrew/skills/speccrew-test-code-gen/SKILL.md +204 -324
  112. package/.speccrew/skills/speccrew-test-code-gen/workflow.agentflow.xml +265 -0
  113. package/.speccrew/skills/speccrew-test-reporter/SKILL.md +205 -184
  114. package/.speccrew/skills/speccrew-test-reporter/workflow.agentflow.xml +284 -0
  115. package/.speccrew/skills/speccrew-test-runner/SKILL.md +242 -241
  116. package/.speccrew/skills/speccrew-test-runner/workflow.agentflow.xml +314 -0
  117. package/bin/cli.js +8 -1
  118. package/lib/commands/validate.js +565 -0
  119. package/package.json +1 -1
  120. package/workspace-template/docs/rules/{xml-workflow-spec.md → agentflow-spec.md} +5 -5
  121. package/workspace-template/scripts/validate-agentflow.js +637 -0
  122. package/.speccrew/agents/speccrew-team-leader-xml.md +0 -480
  123. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/STATUS-FORMATS.md +0 -99
  124. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/batch-orchestrator.js +0 -176
  125. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/get-next-batch.js +0 -150
  126. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/get-pending-features.js +0 -106
  127. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/mark-stale.js +0 -249
  128. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/merge-features.js +0 -300
  129. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/process-batch-results.js +0 -915
  130. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/update-feature-status.js +0 -226
  131. package/.speccrew/skills/speccrew-knowledge-bizs-init-features/examples/features.json +0 -34
  132. package/.speccrew/skills/speccrew-knowledge-bizs-init-features/scripts/generate-inventory.js +0 -1071
  133. package/.speccrew/skills/speccrew-knowledge-bizs-init-features/scripts/test-inventory.js +0 -26
  134. package/.speccrew/skills/speccrew-knowledge-techs-dispatch/STATUS-FORMATS.md +0 -550
@@ -1,39 +1,3 @@
1
- ---
2
- name: speccrew-knowledge-techs-generate-quality-xml
3
- description: Quality assurance for generated tech documentation using XML workflow blocks. Performs cross-validation, consistency checks, completeness verification, and generates quality reports.
4
- tools: Read, Write, Glob, Grep, Bash
5
- ---
6
-
7
- # Tech Documentation Quality Assurance (XML Workflow)
8
-
9
- Perform comprehensive quality checks on generated technology documentation to ensure completeness, consistency, and accuracy using XML workflow blocks.
10
-
11
- ## Role Definition
12
-
13
- You are a Technical Documentation Quality Assurance Specialist. Your role is to verify that generated tech documentation meets quality standards by performing:
14
-
15
- - **Completeness Verification**: Ensure all required documents and sections exist
16
- - **Cross-Validation**: Verify dependencies and references are consistent
17
- - **Consistency Checks**: Ensure naming conventions and style are uniform
18
- - **Source Traceability**: Verify all claims are properly sourced
19
- - **Mermaid Compatibility**: Ensure diagrams render correctly
20
-
21
- ## Trigger Scenarios
22
-
23
- - "Verify tech documentation quality for {platform}"
24
- - "Run quality checks on generated docs"
25
- - "Validate platform tech docs"
26
- - "Check documentation completeness"
27
-
28
- ## User
29
-
30
- Worker Agent (speccrew-task-worker)
31
-
32
- ---
33
-
34
- ## XML Workflow Definition
35
- > **REQUIRED**: Before executing this workflow, read the XML workflow specification: `speccrew-workspace/docs/rules/xml-workflow-spec.md`
36
- ```xml
37
1
  <?xml version="1.0" encoding="UTF-8"?>
38
2
  <workflow id="techs-quality-check" status="pending" version="1.0" desc="Quality assurance for tech documentation">
39
3
  <!-- ============================================================
@@ -452,131 +416,3 @@ Worker Agent (speccrew-task-worker)
452
416
  </block>
453
417
 
454
418
  </workflow>
455
- ```
456
-
457
- ---
458
-
459
- ## Input Parameters
460
-
461
- | Parameter | Required | Description |
462
- |-----------|----------|-------------|
463
- | platform_dir | Yes | Path to platform's techs directory containing generated docs (e.g., `speccrew-workspace/knowledges/techs/{platform_id}/`) |
464
- | platform_id | Yes | Target platform identifier (e.g., "web-react", "backend-nestjs") |
465
- | platform_type | Yes | Platform type (web, mobile, backend, desktop) |
466
- | source_path | Yes | Original source code path for cross-validation |
467
- | analysis_report_path | No | Path to analysis.json for reference (default: `{platform_dir}/{platform_id}.analysis.json`) |
468
-
469
- ---
470
-
471
- ## Output Files
472
-
473
- - Quality Report: `{platform_dir}/quality-report.json`
474
- - Completion Marker: `{platform_dir}/quality-done.json`
475
- - Console summary of check results
476
-
477
- ---
478
-
479
- ## Quality Thresholds
480
-
481
- | Score | Status |
482
- |-------|--------|
483
- | 90-100 | EXCELLENT |
484
- | 80-89 | GOOD |
485
- | 70-79 | ACCEPTABLE |
486
- | 60-69 | NEEDS_IMPROVEMENT |
487
- | 0-59 | FAILED |
488
-
489
- ---
490
-
491
- ## Constraints
492
-
493
- 1. **Read-Only Source Access**: Only READ from source_path, never modify
494
- 2. **Relative Paths Only**: All file references must use relative paths
495
- 3. **JSON Output Only**: Quality report must be valid JSON
496
- 4. **Complete All Steps**: Must complete all 8 steps even if early failures are found
497
- 5. **Detailed Issue Reporting**: Include file paths and line numbers for issues when possible
498
-
499
- ---
500
-
501
- ## Error Handling
502
-
503
- | Error Type | Action |
504
- |------------|--------|
505
- | Platform directory not found | Report error, terminate with failed status |
506
- | Required document missing | Record in completeness check, continue |
507
- | Analysis report missing | Skip cross-validation with source, continue |
508
- | Mermaid parsing error | Record in compatibility check, continue |
509
-
510
- ---
511
-
512
- ## Task Completion Report
513
-
514
- Upon completion, return the following:
515
-
516
- ```
517
- TASK COMPLETED: speccrew-knowledge-techs-generate-quality-xml
518
-
519
- ## Input Parameters
520
- - platform_id: {platform_id}
521
- - platform_dir: {platform_dir}
522
- - source_path: {source_path}
523
-
524
- ## Quality Summary
525
- - Total Checks: {total}
526
- - Passed: {passed}
527
- - Warnings: {warnings}
528
- - Failed: {failed}
529
- - Quality Score: {score}%
530
-
531
- ## Status by Category
532
- - Completeness: {status}
533
- - Cross-Validation: {status}
534
- - Consistency: {status}
535
- - Source Traceability: {status}
536
- - Mermaid Compatibility: {status}
537
-
538
- ## Output
539
- - Quality Report: {platform_dir}/quality-report.json
540
-
541
- ## Recommendations
542
- {list of recommendations if any}
543
- ```
544
-
545
- ---
546
-
547
- ## Integration Notes
548
-
549
- This skill is designed to be invoked after `speccrew-knowledge-techs-generate` completes. The quality report can be used by:
550
-
551
- - `techs-dispatch` to determine if re-generation is needed
552
- - Development teams to identify documentation issues
553
- - CI/CD pipelines to enforce documentation quality gates
554
-
555
- ---
556
-
557
- ## CONTINUOUS EXECUTION RULES
558
-
559
- This skill MUST execute all steps continuously without unnecessary interruptions.
560
-
561
- ### FORBIDDEN Interruptions
562
-
563
- 1. DO NOT ask user "Should I continue?" after completing a step
564
- 2. DO NOT suggest "Let me split this into batches" or "Let's do this in parts"
565
- 3. DO NOT pause to list what you plan to do next — just do it
566
- 4. DO NOT ask for confirmation before generating output files
567
- 5. DO NOT warn about "large number of files" — proceed with generation
568
- 6. DO NOT offer "Should I proceed with the remaining items?"
569
- 7. DO NOT present options like "Full execution / Sample execution / Pause"
570
-
571
- ### When to Pause (ONLY these cases)
572
-
573
- 1. Explicit `<event action="confirm">` blocks in the workflow
574
- 2. Ambiguous requirements that genuinely need clarification
575
- 3. Unrecoverable errors that prevent further progress
576
- 4. Security-sensitive operations (e.g., deleting existing files)
577
-
578
- ### Execution Behavior
579
-
580
- - When multiple checks need to be performed, execute ALL of them sequentially without asking
581
- - Continue execution even if individual checks fail — record failures and proceed
582
- - NEVER voluntarily stop mid-process to ask if user wants to continue
@@ -1,24 +1,25 @@
1
1
  ---
2
2
  name: speccrew-knowledge-techs-generate-ui-style
3
- description: Generate UI style analysis documents for a specific frontend platform. Analyzes page types, components, layouts, and styling conventions from source code. Split from techs-generate for parallel execution with conventions worker. Only applicable to frontend platforms (web, mobile, desktop).
3
+ description: Generate UI style analysis documents for a specific frontend platform using XML workflow blocks. Analyzes page types, components, layouts, and styling conventions from source code. Only applicable to frontend platforms (web, mobile, desktop).
4
4
  tools: Read, Write, Glob, Grep, Skill
5
5
  ---
6
6
 
7
- # Stage 2: Generate Platform UI Style Documents
7
+ # Stage 2: Generate Platform UI Style Documents (XML Workflow)
8
8
 
9
- Generate comprehensive UI style documentation for a specific frontend platform by analyzing its source code structure, components, and styling patterns.
9
+ Generate comprehensive UI style documentation for a specific frontend platform by analyzing its source code structure, components, and styling patterns using XML workflow blocks.
10
10
 
11
11
  ## Language Adaptation
12
12
 
13
- **CRITICAL**: Generate all content in the language specified by the `language` parameter.
13
+ **CRITICAL**: All generated documents must match the user's language. Detect the language from the user's input and generate content accordingly.
14
14
 
15
- - `language: "zh"` → Generate all content in 中文
16
- - `language: "en"` → Generate all content in English
17
- - Other languages → Use the specified language
15
+ - User writes in 中文 → Generate Chinese documents, use `language: "zh"`
16
+ - User writes in English → Generate English documents, use `language: "en"`
17
+ - Other languages → Use the specified language code
18
18
 
19
19
  ## Prerequisite
20
20
 
21
21
  This skill ONLY applies to frontend platforms. The dispatcher MUST check platform_type before invoking:
22
+
22
23
  - `web` → Execute this skill
23
24
  - `mobile` → Execute this skill
24
25
  - `desktop` → Execute this skill
@@ -35,17 +36,17 @@ This skill ONLY applies to frontend platforms. The dispatcher MUST check platfor
35
36
 
36
37
  Worker Agent (speccrew-task-worker)
37
38
 
38
- ## Input
39
+ ---
40
+
41
+ ## AgentFlow Definition
39
42
 
40
- - `platform_id`: Platform identifier (e.g., "web-react", "mobile-uniapp")
41
- - `platform_type`: Platform type (web, mobile, desktop)
42
- - `framework`: Primary framework (react, vue, angular, uniapp, flutter, etc.)
43
- - `source_path`: Platform source directory
44
- - `output_path`: Output directory (e.g., speccrew-workspace/knowledges/techs/{platform_id}/)
45
- - `language`: Target language ("zh", "en") - **REQUIRED**
46
- - `completed_dir`: (Optional) Directory for completion marker and analysis report
43
+ <!-- @agentflow: workflow.agentflow.xml -->
44
+
45
+ > **REQUIRED**: Before executing this workflow, read the XML workflow specification: `speccrew-workspace/docs/rules/agentflow-spec.md`
46
+
47
+ ---
47
48
 
48
- ## Output
49
+ ## Output Directory Structure
49
50
 
50
51
  ```
51
52
  {output_path}/
@@ -79,277 +80,6 @@ Worker Agent (speccrew-task-worker)
79
80
  - NOT created or written by this skill
80
81
  - May not exist if bizs pipeline has not been executed
81
82
 
82
- ## Workflow
83
-
84
- ```mermaid
85
- flowchart TD
86
- Start --> Step0[Step 0: Read UI Style Templates]
87
- Step0 --> Step1[Step 1: UI Style Analysis]
88
- Step1 --> Step2[Step 2: Write Output Files]
89
- Step2 --> Step3[Step 3: Generate Analysis Report]
90
- Step3 --> Step4[Step 4: Report Results]
91
- Step4 --> End
92
- ```
93
-
94
- ### Step 0: Read UI Style Templates
95
-
96
- Before processing, read all UI style template files to understand the required content structure:
97
-
98
- - **Read**: `../speccrew-knowledge-techs-generate/templates/COMPONENT-LIBRARY-TEMPLATE.md` - Component catalog structure
99
- - **Read**: `../speccrew-knowledge-techs-generate/templates/PAGE-LAYOUTS-TEMPLATE.md` - Layout patterns structure
100
- - **Read**: `../speccrew-knowledge-techs-generate/templates/PAGE-TYPE-SUMMARY-TEMPLATE.md` - Page type classification structure
101
- - **Read**: `../speccrew-knowledge-techs-generate/templates/COLOR-SYSTEM-TEMPLATE.md` - Color and typography system structure
102
- - **Purpose**: Understand template structure for fallback path copy+fill workflow
103
-
104
- ### Step 1: UI Style Analysis
105
-
106
- **Directory Ownership**:
107
- - `ui-style/` — Fully managed by techs pipeline (this skill)
108
- - Contains: ui-style-guide.md, styles/, page-types/, components/, layouts/
109
- - Source: Framework-level design system analysis from source code
110
- - `ui-style-patterns/` — Managed by bizs pipeline (Stage 3.5: bizs-ui-style-extract)
111
- - Contains: Business pattern aggregation from feature documents
112
- - NOT created or written by this skill
113
- - May not exist if bizs pipeline has not been executed
114
-
115
- **Primary Path (UI Analyzer Available and Succeeds)**:
116
-
117
- 1. **CRITICAL**: Use the Skill tool to invoke `speccrew-knowledge-techs-ui-analyze` with these exact parameters:
118
- ```
119
- skill: "speccrew-knowledge-techs-ui-analyze"
120
- args: "source_path={source_path};platform_id={platform_id};platform_type={platform_type};framework={framework};output_path={output_path}/ui-style/;language={language}"
121
- ```
122
-
123
- 2. **Wait for completion** and verify output files exist:
124
- - `{output_path}/ui-style/ui-style-guide.md` ✓
125
- - `{output_path}/ui-style/page-types/page-type-summary.md` ✓
126
- - `{output_path}/ui-style/page-types/[type]-pages.md` (one per discovered type) ✓
127
- - `{output_path}/ui-style/components/component-library.md` ✓
128
- - `{output_path}/ui-style/components/common-components.md` ✓
129
- - `{output_path}/ui-style/components/business-components.md` ✓
130
- - `{output_path}/ui-style/layouts/page-layouts.md` ✓
131
- - `{output_path}/ui-style/layouts/navigation-patterns.md` ✓
132
- - `{output_path}/ui-style/styles/color-system.md` ✓
133
- - `{output_path}/ui-style/styles/typography.md` ✓
134
- - `{output_path}/ui-style/styles/spacing-system.md` ✓
135
-
136
- 3. If all outputs verified → proceed to next step
137
- 4. Record: `ui_analysis_level = "full"`
138
-
139
- **Secondary Path (UI Analyzer Fails or Partial Output)**:
140
-
141
- **MANDATORY: UI Style Fallback Path - Complete Directory Structure**
142
-
143
- When UI Style Analyzer fails or produces incomplete output, you MUST create ALL of the following directories and files. Skipping ANY item is FORBIDDEN.
144
-
145
- **Required Directory Structure (MANDATORY - ALL items must be created):**
146
- ```
147
- ui-style/
148
- ├── ui-style-guide.md ← MANDATORY
149
- ├── page-types/
150
- │ └── page-type-summary.md ← MANDATORY
151
- ├── components/
152
- │ └── component-library.md ← MANDATORY
153
- ├── layouts/
154
- │ └── page-layouts.md ← MANDATORY
155
- └── styles/
156
- └── color-system.md ← MANDATORY
157
- ```
158
-
159
- **Self-Verification Checklist (MUST complete before reporting success):**
160
- - [ ] ui-style/ui-style-guide.md exists and has content
161
- - [ ] ui-style/page-types/page-type-summary.md exists and has content
162
- - [ ] ui-style/components/component-library.md exists and has content
163
- - [ ] ui-style/layouts/page-layouts.md exists and has content
164
- - [ ] ui-style/styles/color-system.md exists and has content
165
-
166
- If ANY file in the checklist is missing, you MUST create it before proceeding to the next step. Do NOT report "completed" with missing files.
167
-
168
- **Execution Steps:**
169
-
170
- 1. Create ui-style directory structure:
171
- `{output_path}/ui-style/`, `{output_path}/ui-style/page-types/`, `{output_path}/ui-style/components/`, `{output_path}/ui-style/layouts/`, `{output_path}/ui-style/styles/`
172
-
173
- 2. Generate minimal ui-style-guide.md by manually scanning source code:
174
- - Design system: identify UI framework from dependencies (Material UI, Ant Design, Tailwind, etc.)
175
- - Color system: scan for CSS variables, theme files, or color constants in `{source_path}/src/styles/` or `{source_path}/src/theme/`
176
- - Typography: scan for font-family declarations
177
- - Component library: list directories under `{source_path}/src/components/`
178
- - Page types: list directories/files under `{source_path}/src/pages/` or `{source_path}/src/views/`
179
-
180
- 3. Content structure for minimal ui-style-guide.md:
181
- ```markdown
182
- # UI Style Guide - {platform_id}
183
-
184
- > Note: Generated from manual source code inspection. Automated UI analysis was unavailable.
185
-
186
- ## Design System
187
- - UI Framework: {detected from package.json}
188
- - CSS Approach: {CSS Modules / Tailwind / styled-components / SCSS - detected from config}
189
-
190
- ## Component Library Overview
191
- {list component directories found}
192
-
193
- ## Page Types Identified
194
- {list page directories/files found}
195
-
196
- ## Styling Configuration
197
- {extract from tailwind.config / theme file / CSS variables file}
198
- ```
199
-
200
- 4. **MANDATORY: UI Style Fallback - Copy Template + Fill Workflow**
201
-
202
- For each ui-style sub-document, copy the template and use search_replace to fill:
203
-
204
- **4.1 component-library.md**:
205
- - Copy `templates/COMPONENT-LIBRARY-TEMPLATE.md` to `{output_path}/ui-style/components/component-library.md`
206
- - Use search_replace to fill each AI-TAG section with data extracted from source code
207
- - MUST include props tables for at least the top 5 most-used components
208
- - Fill: COMPONENT_CATEGORIES, API_REFERENCE, COMPOSITION_PATTERNS, AGENT_GUIDE sections
209
-
210
- **4.2 page-layouts.md**:
211
- - Copy `templates/PAGE-LAYOUTS-TEMPLATE.md` to `{output_path}/ui-style/layouts/page-layouts.md`
212
- - Fill layout types, slots, responsive behavior from source analysis
213
- - Fill: LAYOUT_TYPES, LAYOUT_DETAILS, NAVIGATION sections
214
-
215
- **4.3 page-type-summary.md**:
216
- - Copy `templates/PAGE-TYPE-SUMMARY-TEMPLATE.md` to `{output_path}/ui-style/page-types/page-type-summary.md`
217
- - Fill page classifications and routing conventions
218
- - Fill: PAGE_TYPES, PAGE_TYPE_DETAILS, ROUTING sections
219
-
220
- **4.4 color-system.md**:
221
- - Copy `templates/COLOR-SYSTEM-TEMPLATE.md` to `{output_path}/ui-style/styles/color-system.md`
222
- - Fill theme colors, functional colors, typography from CSS/SCSS variables
223
- - Fill: THEME_COLORS, FUNCTIONAL_COLORS, SEMANTIC_TOKENS, TYPOGRAPHY, SPACING sections
224
-
225
- 5. Record: `ui_analysis_level = "minimal"`
226
-
227
- **Tertiary Path (No UI Analysis Possible)**:
228
-
229
- If source code scanning also fails (e.g., non-standard structure):
230
-
231
- 1. Create `{output_path}/ui-style/ui-style-guide.md` with references only:
232
- ```markdown
233
- # UI Style Guide - {platform_id}
234
-
235
- > Note: Automated and manual UI analysis were not possible for this platform.
236
- > Manual inspection of source code is required.
237
-
238
- ## References
239
- - Source components: {source_path}/src/components/ (if exists)
240
- - Source pages: {source_path}/src/pages/ (if exists)
241
- - Style files: {source_path}/src/styles/ (if exists)
242
- - Package dependencies: {source_path}/package.json
243
- ```
244
-
245
- 2. Record: `ui_analysis_level = "reference_only"`
246
-
247
- **Note**: The conventions-design.md reference to ui-style is maintained by the conventions worker.
248
-
249
- ### Step 2: Write Output Files
250
-
251
- Create output directory structure if not exists:
252
-
253
- 1. **Create directories**:
254
- - `{output_path}/ui-style/`
255
- - `{output_path}/ui-style/page-types/`
256
- - `{output_path}/ui-style/components/`
257
- - `{output_path}/ui-style/layouts/`
258
- - `{output_path}/ui-style/styles/`
259
-
260
- 2. **Write all generated ui-style documents** to their respective directories.
261
-
262
- ### Step 3: Generate Analysis Report
263
-
264
- **Output file**: `{completed_dir}/{platform_id}.analysis-ui-style.json`
265
-
266
- **Report Format**:
267
-
268
- ```json
269
- {
270
- "platform_id": "{platform_id}",
271
- "platform_type": "{platform_type}",
272
- "worker_type": "ui-style",
273
- "analyzed_at": "{ISO 8601 timestamp}",
274
- "ui_analysis_level": "full | minimal | reference_only",
275
- "topics": {
276
- "page_types": {
277
- "status": "found | not_found | partial",
278
- "count": N,
279
- "files_analyzed": ["src/views/..."],
280
- "notes": "..."
281
- },
282
- "components": {
283
- "status": "found | not_found | partial",
284
- "common_count": N,
285
- "business_count": N,
286
- "files_analyzed": ["src/components/..."],
287
- "notes": "..."
288
- },
289
- "layouts": {
290
- "status": "found | not_found | partial",
291
- "count": N,
292
- "files_analyzed": ["src/layouts/..."],
293
- "notes": "..."
294
- },
295
- "styles": {
296
- "status": "found | not_found | partial",
297
- "files_analyzed": ["src/styles/..."],
298
- "notes": "..."
299
- }
300
- },
301
- "documents_generated": ["ui-style-guide.md", "page-types/page-type-summary.md", ...],
302
- "source_dirs_scanned": ["src/views/", "src/components/", "src/styles/", "src/layouts/"],
303
- "coverage_summary": {
304
- "total_topics": 4,
305
- "found": N,
306
- "not_found": N,
307
- "partial": N,
308
- "coverage_percent": N
309
- }
310
- }
311
- ```
312
-
313
- **Rules**:
314
- - Every topic from the analysis MUST appear in the `topics` object
315
- - `files_analyzed` MUST list the actual file paths you read (relative to source_path)
316
- - `status` MUST be one of: `found`, `not_found`, `partial`
317
- - `coverage_percent` = (topics_found + topics_partial) / topics_total * 100, rounded to integer
318
- - `documents_generated` MUST list all .md files actually created
319
- - Use `create_file` to write this JSON file (this is the ONE exception where create_file is allowed — for JSON output files)
320
-
321
- ### Step 4: Report Results
322
-
323
- **Completion marker file**: `{completed_dir}/{platform_id}.done-ui-style.json`
324
-
325
- **Format**:
326
-
327
- ```json
328
- {
329
- "platform_id": "{platform_id}",
330
- "worker_type": "ui-style",
331
- "status": "completed",
332
- "ui_analysis_level": "full | minimal | reference_only",
333
- "documents_generated": [...],
334
- "analysis_file": "{platform_id}.analysis-ui-style.json",
335
- "completed_at": "{ISO timestamp}"
336
- }
337
- ```
338
-
339
- **Console output**:
340
-
341
- ```
342
- Platform UI Style Documents Generated: {platform_id}
343
- - ui-style-guide.md: ✓ (analysis level: {ui_analysis_level})
344
- - page-types/page-type-summary.md: ✓
345
- - components/component-library.md: ✓
346
- - layouts/page-layouts.md: ✓
347
- - styles/color-system.md: ✓
348
- - Output Directory: {output_path}/ui-style/
349
- - Analysis Report: {completed_dir}/{platform_id}.analysis-ui-style.json
350
- - Completion Marker: {completed_dir}/{platform_id}.done-ui-style.json
351
- ```
352
-
353
83
  ---
354
84
 
355
85
  ## Quality Requirements
@@ -359,18 +89,23 @@ Platform UI Style Documents Generated: {platform_id}
359
89
  - Analysis report MUST honestly reflect coverage level
360
90
  - All paths in documents MUST be relative (never absolute or file:// protocol)
361
91
 
92
+ ---
93
+
362
94
  ## Error Handling
363
95
 
364
- - If ui-analyze skill invocation fails → Execute Secondary Path (template fill)
365
- - If source code structure is non-standard and cannot be analyzed → Execute Tertiary Path (reference only)
366
- - Any path MUST output the done file and analysis file
367
- - Never report "completed" with missing mandatory files
96
+ | Error Type | Action |
97
+ |------------|--------|
98
+ | Platform type is backend/api | Skip execution, return skipped status |
99
+ | UI analyzer skill invocation fails | Execute Secondary Path (template fill) |
100
+ | Source code structure is non-standard | Execute Tertiary Path (reference only) |
101
+ | Template not found | Use default structure, log warning |
102
+ | Any path MUST output the done file and analysis file | Never report "completed" with missing mandatory files |
368
103
 
369
104
  ---
370
105
 
371
106
  ## Task Completion Report
372
107
 
373
- Upon completion, output the following structured report:
108
+ Upon completion, return the following structured report:
374
109
 
375
110
  ```json
376
111
  {
@@ -425,3 +160,33 @@ Upon completion, output the following structured report:
425
160
  - [ ] Analysis report generated: `{platform_id}.analysis-ui-style.json`
426
161
  - [ ] Completion marker generated: `{platform_id}.done-ui-style.json`
427
162
  - [ ] Console output reported with correct status
163
+
164
+ ---
165
+
166
+ ## CONTINUOUS EXECUTION RULES
167
+
168
+ This skill MUST execute all steps continuously without unnecessary interruptions.
169
+
170
+ ### FORBIDDEN Interruptions
171
+
172
+ 1. DO NOT ask user "Should I continue?" after completing a step
173
+ 2. DO NOT suggest "Let me split this into batches" or "Let's do this in parts"
174
+ 3. DO NOT pause to list what you plan to do next — just do it
175
+ 4. DO NOT ask for confirmation before generating output files
176
+ 5. DO NOT warn about "large number of files" — proceed with generation
177
+ 6. DO NOT offer "Should I proceed with the remaining items?"
178
+ 7. DO NOT present options like "Full execution / Sample execution / Pause"
179
+
180
+ ### When to Pause (ONLY these cases)
181
+
182
+ 1. Explicit `<event action="confirm">` blocks in the workflow
183
+ 2. Ambiguous requirements that genuinely need clarification
184
+ 3. Unrecoverable errors that prevent further progress
185
+ 4. Security-sensitive operations (e.g., deleting existing files)
186
+
187
+ ### Execution Behavior
188
+
189
+ - When multiple templates need filling, process ALL of them sequentially without asking
190
+ - Use checkpoint files to track progress, enabling resumption if interrupted
191
+ - If context window is approaching limit, save progress and inform user how to resume
192
+ - NEVER voluntarily stop mid-process to ask if user wants to continue