speccrew 0.6.69 → 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.
- package/.speccrew/agents/speccrew-task-worker.md +1 -1
- package/.speccrew/agents/speccrew-team-leader.md +336 -189
- package/.speccrew/skills/speccrew-agentflow-manager/SKILL.md +161 -0
- package/.speccrew/skills/speccrew-agentflow-manager/workflow.agentflow.xml +347 -0
- package/.speccrew/skills/speccrew-deploy-build/SKILL.md +3 -56
- package/.speccrew/skills/speccrew-deploy-build/workflow.agentflow.xml +125 -0
- package/.speccrew/skills/speccrew-deploy-migrate/SKILL.md +3 -64
- package/.speccrew/skills/speccrew-deploy-migrate/workflow.agentflow.xml +135 -0
- package/.speccrew/skills/speccrew-deploy-smoke-test/SKILL.md +4 -156
- package/.speccrew/skills/speccrew-deploy-smoke-test/workflow.agentflow.xml +178 -0
- package/.speccrew/skills/speccrew-deploy-startup/SKILL.md +3 -135
- package/.speccrew/skills/speccrew-deploy-startup/workflow.agentflow.xml +223 -0
- package/.speccrew/skills/speccrew-dev-backend/SKILL.md +10 -2
- package/.speccrew/skills/speccrew-dev-backend/workflow.agentflow.xml +254 -0
- package/.speccrew/skills/speccrew-dev-desktop-electron/SKILL.md +10 -2
- package/.speccrew/skills/speccrew-dev-desktop-electron/workflow.agentflow.xml +259 -0
- package/.speccrew/skills/speccrew-dev-desktop-tauri/SKILL.md +10 -2
- package/.speccrew/skills/speccrew-dev-desktop-tauri/workflow.agentflow.xml +245 -0
- package/.speccrew/skills/speccrew-dev-frontend/SKILL.md +10 -2
- package/.speccrew/skills/speccrew-dev-frontend/workflow.agentflow.xml +262 -0
- package/.speccrew/skills/speccrew-dev-mobile/SKILL.md +10 -2
- package/.speccrew/skills/speccrew-dev-mobile/workflow.agentflow.xml +244 -0
- package/.speccrew/skills/speccrew-dev-review-backend/SKILL.md +10 -2
- package/.speccrew/skills/speccrew-dev-review-backend/workflow.agentflow.xml +251 -0
- package/.speccrew/skills/speccrew-dev-review-desktop/SKILL.md +10 -2
- package/.speccrew/skills/speccrew-dev-review-desktop/workflow.agentflow.xml +214 -0
- package/.speccrew/skills/speccrew-dev-review-frontend/SKILL.md +10 -2
- package/.speccrew/skills/speccrew-dev-review-frontend/workflow.agentflow.xml +213 -0
- package/.speccrew/skills/speccrew-dev-review-mobile/SKILL.md +10 -2
- package/.speccrew/skills/speccrew-dev-review-mobile/workflow.agentflow.xml +214 -0
- package/.speccrew/skills/speccrew-fd-api-contract/SKILL.md +7 -1
- package/.speccrew/skills/speccrew-fd-api-contract/workflow.agentflow.xml +222 -0
- package/.speccrew/skills/speccrew-fd-feature-analyze/SKILL.md +7 -1
- package/.speccrew/skills/speccrew-fd-feature-analyze/workflow.agentflow.xml +223 -0
- package/.speccrew/skills/speccrew-fd-feature-design/SKILL.md +7 -1
- package/.speccrew/skills/speccrew-fd-feature-design/workflow.agentflow.xml +322 -0
- package/.speccrew/skills/speccrew-get-timestamp/SKILL.md +3 -39
- package/.speccrew/skills/speccrew-get-timestamp/workflow.agentflow.xml +43 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/SKILL.md +57 -508
- package/.speccrew/skills/{speccrew-knowledge-bizs-api-analyze-xml/SKILL.md → speccrew-knowledge-bizs-api-analyze/workflow.agentflow.xml} +1 -154
- package/.speccrew/skills/speccrew-knowledge-bizs-api-graph/SKILL.md +73 -283
- package/.speccrew/skills/{speccrew-knowledge-bizs-api-graph-xml/SKILL.md → speccrew-knowledge-bizs-api-graph/workflow.agentflow.xml} +0 -298
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/SKILL.md +931 -801
- package/.speccrew/skills/{speccrew-knowledge-bizs-dispatch-xml/SKILL.md → speccrew-knowledge-bizs-dispatch/workflow.agentflow.xml} +42 -272
- package/.speccrew/skills/speccrew-knowledge-bizs-identify-entries/SKILL.md +263 -71
- package/.speccrew/skills/{speccrew-knowledge-bizs-identify-entries-xml/SKILL.md → speccrew-knowledge-bizs-identify-entries/workflow.agentflow.xml} +8 -184
- package/.speccrew/skills/speccrew-knowledge-bizs-init-features/SKILL.md +200 -181
- package/.speccrew/skills/{speccrew-knowledge-bizs-init-features-xml/SKILL.md → speccrew-knowledge-bizs-init-features/workflow.agentflow.xml} +7 -134
- package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/SKILL.md +5 -89
- package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/workflow.agentflow.xml +129 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/SKILL.md +454 -326
- package/.speccrew/skills/{speccrew-knowledge-bizs-ui-analyze-xml/SKILL.md → speccrew-knowledge-bizs-ui-analyze/workflow.agentflow.xml} +8 -128
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-graph/SKILL.md +302 -247
- package/.speccrew/skills/{speccrew-knowledge-bizs-ui-graph-xml/SKILL.md → speccrew-knowledge-bizs-ui-graph/workflow.agentflow.xml} +7 -199
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-style-extract/SKILL.md +267 -156
- package/.speccrew/skills/{speccrew-knowledge-bizs-ui-style-extract-xml/SKILL.md → speccrew-knowledge-bizs-ui-style-extract/workflow.agentflow.xml} +7 -151
- package/.speccrew/skills/speccrew-knowledge-graph-query/SKILL.md +3 -122
- package/.speccrew/skills/speccrew-knowledge-graph-query/workflow.agentflow.xml +106 -0
- package/.speccrew/skills/speccrew-knowledge-graph-write/SKILL.md +3 -80
- package/.speccrew/skills/speccrew-knowledge-graph-write/workflow.agentflow.xml +152 -0
- package/.speccrew/skills/speccrew-knowledge-module-summarize/SKILL.md +371 -265
- package/.speccrew/skills/{speccrew-knowledge-module-summarize-xml/SKILL.md → speccrew-knowledge-module-summarize/workflow.agentflow.xml} +7 -197
- package/.speccrew/skills/speccrew-knowledge-system-summarize/SKILL.md +45 -333
- package/.speccrew/skills/{speccrew-knowledge-system-summarize-xml/SKILL.md → speccrew-knowledge-system-summarize/workflow.agentflow.xml} +0 -177
- package/.speccrew/skills/speccrew-knowledge-techs-dispatch/SKILL.md +174 -727
- package/.speccrew/skills/{speccrew-knowledge-techs-dispatch-xml/SKILL.md → speccrew-knowledge-techs-dispatch/workflow.agentflow.xml} +10 -351
- package/.speccrew/skills/speccrew-knowledge-techs-generate/SKILL.md +20 -150
- package/.speccrew/skills/{speccrew-knowledge-techs-generate-xml/SKILL.md → speccrew-knowledge-techs-generate/workflow.agentflow.xml} +0 -169
- package/.speccrew/skills/speccrew-knowledge-techs-generate-conventions/SKILL.md +75 -587
- package/.speccrew/skills/{speccrew-knowledge-techs-generate-conventions-xml/SKILL.md → speccrew-knowledge-techs-generate-conventions/workflow.agentflow.xml} +0 -153
- package/.speccrew/skills/speccrew-knowledge-techs-generate-quality/SKILL.md +463 -297
- package/.speccrew/skills/{speccrew-knowledge-techs-generate-quality-xml/SKILL.md → speccrew-knowledge-techs-generate-quality/workflow.agentflow.xml} +0 -164
- package/.speccrew/skills/speccrew-knowledge-techs-generate-ui-style/SKILL.md +57 -292
- package/.speccrew/skills/{speccrew-knowledge-techs-generate-ui-style-xml/SKILL.md → speccrew-knowledge-techs-generate-ui-style/workflow.agentflow.xml} +2 -193
- package/.speccrew/skills/speccrew-knowledge-techs-index/SKILL.md +49 -335
- package/.speccrew/skills/{speccrew-knowledge-techs-index-xml/SKILL.md → speccrew-knowledge-techs-index/workflow.agentflow.xml} +0 -167
- package/.speccrew/skills/speccrew-knowledge-techs-init/SKILL.md +28 -109
- package/.speccrew/skills/{speccrew-knowledge-techs-init-xml/SKILL.md → speccrew-knowledge-techs-init/workflow.agentflow.xml} +0 -189
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/SKILL.md +3 -487
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/workflow.agentflow.xml +278 -0
- package/.speccrew/skills/speccrew-pm-knowledge-detector/SKILL.md +3 -71
- package/.speccrew/skills/speccrew-pm-knowledge-detector/workflow.agentflow.xml +108 -0
- package/.speccrew/skills/speccrew-pm-module-initializer/SKILL.md +3 -107
- package/.speccrew/skills/speccrew-pm-module-initializer/workflow.agentflow.xml +139 -0
- package/.speccrew/skills/speccrew-pm-module-matcher/SKILL.md +3 -115
- package/.speccrew/skills/speccrew-pm-module-matcher/workflow.agentflow.xml +146 -0
- package/.speccrew/skills/speccrew-pm-requirement-analysis/SKILL.md +3 -343
- package/.speccrew/skills/speccrew-pm-requirement-analysis/workflow.agentflow.xml +174 -0
- package/.speccrew/skills/speccrew-pm-requirement-assess/SKILL.md +3 -91
- package/.speccrew/skills/speccrew-pm-requirement-assess/workflow.agentflow.xml +173 -0
- package/.speccrew/skills/speccrew-pm-requirement-clarify/SKILL.md +3 -224
- package/.speccrew/skills/speccrew-pm-requirement-clarify/workflow.agentflow.xml +159 -0
- package/.speccrew/skills/speccrew-pm-requirement-model/SKILL.md +3 -275
- package/.speccrew/skills/speccrew-pm-requirement-model/workflow.agentflow.xml +210 -0
- package/.speccrew/skills/speccrew-pm-requirement-simple/SKILL.md +3 -76
- package/.speccrew/skills/speccrew-pm-requirement-simple/workflow.agentflow.xml +120 -0
- package/.speccrew/skills/speccrew-pm-sub-prd-generate/SKILL.md +7 -1
- package/.speccrew/skills/speccrew-pm-sub-prd-generate/workflow.agentflow.xml +218 -0
- package/.speccrew/skills/speccrew-sd-backend/SKILL.md +7 -1
- package/.speccrew/skills/speccrew-sd-backend/workflow.agentflow.xml +264 -0
- package/.speccrew/skills/speccrew-sd-desktop/SKILL.md +7 -1
- package/.speccrew/skills/speccrew-sd-desktop/workflow.agentflow.xml +288 -0
- package/.speccrew/skills/speccrew-sd-framework-evaluate/SKILL.md +7 -1
- package/.speccrew/skills/speccrew-sd-framework-evaluate/workflow.agentflow.xml +235 -0
- package/.speccrew/skills/speccrew-sd-frontend/SKILL.md +7 -1
- package/.speccrew/skills/speccrew-sd-frontend/workflow.agentflow.xml +299 -0
- package/.speccrew/skills/speccrew-sd-mobile/SKILL.md +7 -1
- package/.speccrew/skills/speccrew-sd-mobile/workflow.agentflow.xml +301 -0
- package/.speccrew/skills/speccrew-test-case-design/SKILL.md +165 -284
- package/.speccrew/skills/speccrew-test-case-design/workflow.agentflow.xml +210 -0
- package/.speccrew/skills/speccrew-test-code-gen/SKILL.md +204 -324
- package/.speccrew/skills/speccrew-test-code-gen/workflow.agentflow.xml +265 -0
- package/.speccrew/skills/speccrew-test-reporter/SKILL.md +205 -184
- package/.speccrew/skills/speccrew-test-reporter/workflow.agentflow.xml +284 -0
- package/.speccrew/skills/speccrew-test-runner/SKILL.md +242 -241
- package/.speccrew/skills/speccrew-test-runner/workflow.agentflow.xml +314 -0
- package/bin/cli.js +8 -1
- package/lib/commands/validate.js +565 -0
- package/package.json +1 -1
- package/workspace-template/docs/rules/{xml-workflow-spec.md → agentflow-spec.md} +5 -5
- package/workspace-template/scripts/validate-agentflow.js +637 -0
- package/.speccrew/agents/speccrew-team-leader-xml.md +0 -480
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/STATUS-FORMATS.md +0 -99
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/batch-orchestrator.js +0 -176
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/get-next-batch.js +0 -150
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/get-pending-features.js +0 -106
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/mark-stale.js +0 -249
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/merge-features.js +0 -300
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/process-batch-results.js +0 -915
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/update-feature-status.js +0 -226
- package/.speccrew/skills/speccrew-knowledge-bizs-init-features/examples/features.json +0 -34
- package/.speccrew/skills/speccrew-knowledge-bizs-init-features/scripts/generate-inventory.js +0 -1087
- package/.speccrew/skills/speccrew-knowledge-bizs-init-features/scripts/test-inventory.js +0 -26
- package/.speccrew/skills/speccrew-knowledge-techs-dispatch/STATUS-FORMATS.md +0 -550
|
@@ -47,95 +47,11 @@ Worker MUST return a JSON result containing the module mapping (NOT modify the f
|
|
|
47
47
|
- The `mapping` will be passed to `apply-module-mapping.js` by the dispatch agent to batch-update the features file
|
|
48
48
|
- Worker MUST NOT modify the features file directly
|
|
49
49
|
|
|
50
|
-
##
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
- Parse the `module_summary` JSON parameter (pre-processed by dispatch via extract-module-summary.js)
|
|
57
|
-
- Extract: module names, feature counts per module, and sample source paths
|
|
58
|
-
- Note: The summary contains compact data for LLM analysis, not the full features file
|
|
59
|
-
|
|
60
|
-
### Step 2: Analyze Module Semantics
|
|
61
|
-
|
|
62
|
-
- Analyze each module's `sampleSourcePaths` to identify business semantics
|
|
63
|
-
- Identify logical business domains based on path patterns:
|
|
64
|
-
|
|
65
|
-
**Path pattern analysis for web/mobile platforms:**
|
|
66
|
-
- Examine sample paths under views/pages directories
|
|
67
|
-
- Match directory naming patterns to business domains
|
|
68
|
-
- Cross-reference with common business module patterns
|
|
69
|
-
|
|
70
|
-
**Path pattern analysis for backend platforms:**
|
|
71
|
-
- Examine controller/module directory patterns
|
|
72
|
-
- Identify domain boundaries from package naming
|
|
73
|
-
|
|
74
|
-
- Build a **business module map**: a list of logical business domains with descriptions
|
|
75
|
-
- Example: `system` (system management), `trade` (trade/order), `bpm` (business process), `infra` (infrastructure)
|
|
76
|
-
|
|
77
|
-
### Step 3: Reclassify Modules
|
|
78
|
-
|
|
79
|
-
- For each module in the `module_summary`:
|
|
80
|
-
- Analyze sample source paths and directory context
|
|
81
|
-
- Match to the most appropriate business module from the module map
|
|
82
|
-
- Determine if the module name needs to change
|
|
83
|
-
|
|
84
|
-
**Naming rules:**
|
|
85
|
-
- Use lowercase for module names (e.g., `system`, `trade`, `bpm`)
|
|
86
|
-
- Use kebab-case for multi-word names (e.g., `order-management`)
|
|
87
|
-
- Module names must reflect business domains, NOT page types or UI components
|
|
88
|
-
|
|
89
|
-
**Classification rules:**
|
|
90
|
-
- Modules clearly belonging to a business domain → use that domain name
|
|
91
|
-
- Example: `system/user` paths → module: `system`
|
|
92
|
-
- Example: `trade/order` paths → module: `trade`
|
|
93
|
-
- Utility/common modules that don't belong to a specific domain → module: `_common`
|
|
94
|
-
- Example: `Error` module → module: `_common`
|
|
95
|
-
- Example: `Home` module → module: `_common`
|
|
96
|
-
- Example: `Redirect` module → module: `_common`
|
|
97
|
-
- Login/authentication modules → module: `system` (or domain-appropriate)
|
|
98
|
-
- Example: `Login` module → module: `system`
|
|
99
|
-
|
|
100
|
-
**Validation:**
|
|
101
|
-
- Every module in the mapping must have a valid business domain name
|
|
102
|
-
- No page-type module names should remain as values (Error, Login, Home, Profile, Redirect)
|
|
103
|
-
- All new module names are lowercase or kebab-case
|
|
104
|
-
|
|
105
|
-
### Step 4: Output Module Mapping
|
|
106
|
-
|
|
107
|
-
> **CRITICAL CONSTRAINT**: This skill produces a module mapping as output only. DO NOT modify the features JSON file. DO NOT create any temporary scripts or files. The dispatch agent will apply the mapping using the `apply-module-mapping.js` script.
|
|
108
|
-
|
|
109
|
-
Based on the reclassification analysis, construct and return the mapping result:
|
|
110
|
-
|
|
111
|
-
1. **Build the mapping object**: For each module that needs to change:
|
|
112
|
-
- Key: original module name (directory-based)
|
|
113
|
-
- Value: new business module name
|
|
114
|
-
- Example: `{ "Error": "_common", "Login": "system" }`
|
|
115
|
-
|
|
116
|
-
2. **Count reclassified features**: Calculate total number of features that will be affected by this mapping
|
|
117
|
-
|
|
118
|
-
3. **Return the JSON result**:
|
|
119
|
-
```json
|
|
120
|
-
{
|
|
121
|
-
"status": "success",
|
|
122
|
-
"message": "Reclassified 12 features from 5 directory modules to 4 business modules",
|
|
123
|
-
"mapping": {
|
|
124
|
-
"Error": "_common",
|
|
125
|
-
"Home": "_common",
|
|
126
|
-
"Login": "system",
|
|
127
|
-
"Profile": "_common",
|
|
128
|
-
"Redirect": "_common"
|
|
129
|
-
},
|
|
130
|
-
"modules_reclassified": 12
|
|
131
|
-
}
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
**Validation before returning**:
|
|
135
|
-
- Every mapping key-value pair has non-empty values
|
|
136
|
-
- No page-type module names remain as values (Error, Login, Home, Profile, Redirect should not appear as values)
|
|
137
|
-
- All new module names are lowercase or kebab-case
|
|
138
|
-
- `modules_reclassified` count is accurate
|
|
50
|
+
## AgentFlow Definition
|
|
51
|
+
|
|
52
|
+
<!-- @agentflow: workflow.agentflow.xml -->
|
|
53
|
+
|
|
54
|
+
> **REQUIRED**: Before executing this workflow, read the XML workflow specification: `speccrew-workspace/docs/rules/agentflow-spec.md`
|
|
139
55
|
|
|
140
56
|
## Return
|
|
141
57
|
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<workflow id="knowledge-bizs-module-classify" status="pending" version="1.0" desc="Classify features into business modules by analyzing source code structure">
|
|
3
|
+
|
|
4
|
+
<!-- ============================================================
|
|
5
|
+
Input Parameters Definition
|
|
6
|
+
============================================================ -->
|
|
7
|
+
<block type="input" id="I1" desc="Workflow input parameters">
|
|
8
|
+
<field name="features_file" required="true" type="string" desc="Path to features-{platform}.json file (for reference only, Worker should NOT read it)"/>
|
|
9
|
+
<field name="source_path" required="true" type="string" desc="Source code root path for context"/>
|
|
10
|
+
<field name="module_summary" required="true" type="string" desc="JSON string containing module names, feature counts, and sample source paths"/>
|
|
11
|
+
<field name="language" required="true" type="string" desc="User's language code (e.g., zh, en)"/>
|
|
12
|
+
</block>
|
|
13
|
+
|
|
14
|
+
<!-- ============================================================
|
|
15
|
+
Global Constraints
|
|
16
|
+
============================================================ -->
|
|
17
|
+
<block type="rule" id="R1" level="forbidden" desc="Pure reasoning task constraints">
|
|
18
|
+
<field name="text">DO NOT use any tools (Read, Write, Bash, terminal, etc.)</field>
|
|
19
|
+
<field name="text">DO NOT read files — the module summary is provided as input parameter</field>
|
|
20
|
+
<field name="text">DO NOT modify any files — output a mapping JSON only</field>
|
|
21
|
+
</block>
|
|
22
|
+
|
|
23
|
+
<block type="rule" id="R2" level="mandatory" desc="Output constraints">
|
|
24
|
+
<field name="text">Only include modules that need to change in the mapping object</field>
|
|
25
|
+
<field name="text">Modules that remain the same should NOT be listed</field>
|
|
26
|
+
<field name="text">The mapping will be passed to apply-module-mapping.js by the dispatch agent</field>
|
|
27
|
+
<field name="text">Worker MUST NOT modify the features file directly</field>
|
|
28
|
+
</block>
|
|
29
|
+
|
|
30
|
+
<!-- ============================================================
|
|
31
|
+
Main Processing Sequence
|
|
32
|
+
============================================================ -->
|
|
33
|
+
<sequence id="S1" name="Module Classification" status="pending" desc="Parse, analyze, and reclassify modules">
|
|
34
|
+
|
|
35
|
+
<!-- Step 1: Parse Module Summary -->
|
|
36
|
+
<block type="task" id="B1" action="analyze" desc="Parse module summary JSON parameter">
|
|
37
|
+
<field name="input">${module_summary}</field>
|
|
38
|
+
<field name="rules">
|
|
39
|
+
- Parse the module_summary JSON parameter
|
|
40
|
+
- Extract: module names, feature counts per module, and sample source paths
|
|
41
|
+
- Note: The summary contains compact data for LLM analysis, not the full features file
|
|
42
|
+
</field>
|
|
43
|
+
<field name="output" var="parsed_summary"/>
|
|
44
|
+
</block>
|
|
45
|
+
|
|
46
|
+
<!-- Step 2: Analyze Module Semantics -->
|
|
47
|
+
<block type="task" id="B2" action="analyze" desc="Analyze each module's business semantics">
|
|
48
|
+
<field name="rules">
|
|
49
|
+
- Analyze each module's sampleSourcePaths to identify business semantics
|
|
50
|
+
- Identify logical business domains based on path patterns:
|
|
51
|
+
|
|
52
|
+
Path pattern analysis for web/mobile platforms:
|
|
53
|
+
- Examine sample paths under views/pages directories
|
|
54
|
+
- Match directory naming patterns to business domains
|
|
55
|
+
- Cross-reference with common business module patterns
|
|
56
|
+
|
|
57
|
+
Path pattern analysis for backend platforms:
|
|
58
|
+
- Examine controller/module directory patterns
|
|
59
|
+
- Identify domain boundaries from package naming
|
|
60
|
+
|
|
61
|
+
Build a business module map: a list of logical business domains with descriptions
|
|
62
|
+
- Example: system (system management), trade (trade/order), bpm (business process), infra (infrastructure)
|
|
63
|
+
</field>
|
|
64
|
+
<field name="output" var="module_map"/>
|
|
65
|
+
</block>
|
|
66
|
+
|
|
67
|
+
<!-- Step 3: Reclassify Modules -->
|
|
68
|
+
<block type="task" id="B3" action="analyze" desc="Reclassify modules based on business semantics">
|
|
69
|
+
<field name="rules">
|
|
70
|
+
- For each module in the parsed_summary:
|
|
71
|
+
- Analyze sample source paths and directory context
|
|
72
|
+
- Match to the most appropriate business module from the module map
|
|
73
|
+
- Determine if the module name needs to change
|
|
74
|
+
|
|
75
|
+
Naming rules:
|
|
76
|
+
- Use lowercase for module names (e.g., system, trade, bpm)
|
|
77
|
+
- Use kebab-case for multi-word names (e.g., order-management)
|
|
78
|
+
- Module names must reflect business domains, NOT page types or UI components
|
|
79
|
+
|
|
80
|
+
Classification rules:
|
|
81
|
+
- Modules clearly belonging to a business domain → use that domain name
|
|
82
|
+
- Example: system/user paths → module: system
|
|
83
|
+
- Example: trade/order paths → module: trade
|
|
84
|
+
- Utility/common modules that don't belong to a specific domain → module: _common
|
|
85
|
+
- Example: Error module → module: _common
|
|
86
|
+
- Example: Home module → module: _common
|
|
87
|
+
- Example: Redirect module → module: _common
|
|
88
|
+
- Login/authentication modules → module: system (or domain-appropriate)
|
|
89
|
+
- Example: Login module → module: system
|
|
90
|
+
|
|
91
|
+
Validation:
|
|
92
|
+
- Every module in the mapping must have a valid business domain name
|
|
93
|
+
- No page-type module names should remain as values (Error, Login, Home, Profile, Redirect)
|
|
94
|
+
- All new module names are lowercase or kebab-case
|
|
95
|
+
</field>
|
|
96
|
+
<field name="output" var="reclassification_result"/>
|
|
97
|
+
</block>
|
|
98
|
+
|
|
99
|
+
<!-- Step 4: Output Module Mapping -->
|
|
100
|
+
<block type="task" id="B4" action="analyze" desc="Build and validate mapping result">
|
|
101
|
+
<field name="rules">
|
|
102
|
+
- Build the mapping object: For each module that needs to change:
|
|
103
|
+
- Key: original module name (directory-based)
|
|
104
|
+
- Value: new business module name
|
|
105
|
+
- Example: { "Error": "_common", "Login": "system" }
|
|
106
|
+
- Count reclassified features: Calculate total number of features that will be affected
|
|
107
|
+
|
|
108
|
+
Validation before returning:
|
|
109
|
+
- Every mapping key-value pair has non-empty values
|
|
110
|
+
- No page-type module names remain as values (Error, Login, Home, Profile, Redirect should not appear as values)
|
|
111
|
+
- All new module names are lowercase or kebab-case
|
|
112
|
+
- modules_reclassified count is accurate
|
|
113
|
+
</field>
|
|
114
|
+
<field name="output" var="mapping_result"/>
|
|
115
|
+
</block>
|
|
116
|
+
|
|
117
|
+
</sequence>
|
|
118
|
+
|
|
119
|
+
<!-- ============================================================
|
|
120
|
+
Output Results
|
|
121
|
+
============================================================ -->
|
|
122
|
+
<block type="output" id="O1" desc="Workflow output results">
|
|
123
|
+
<field name="status" from="${mapping_result.status}" type="string" desc="Status: success or failed"/>
|
|
124
|
+
<field name="message" from="${mapping_result.message}" type="string" desc="Description of reclassification"/>
|
|
125
|
+
<field name="mapping" from="${mapping_result.mapping}" type="object" desc="Module name mapping (old → new)"/>
|
|
126
|
+
<field name="modules_reclassified" from="${mapping_result.modules_reclassified}" type="number" desc="Number of features reclassified"/>
|
|
127
|
+
</block>
|
|
128
|
+
|
|
129
|
+
</workflow>
|