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.
- 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 -1071
- 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
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<workflow id="dev-review-mobile" status="pending" version="1.0" desc="Mobile Code Review - Reviews mobile app implementation against design documents">
|
|
3
|
+
|
|
4
|
+
<!-- ============================================================
|
|
5
|
+
Input Parameters Definition
|
|
6
|
+
============================================================ -->
|
|
7
|
+
<block type="input" id="I1" desc="Workflow input parameters">
|
|
8
|
+
<field name="design_doc_path" required="true" type="string" desc="Path to mobile module design document"/>
|
|
9
|
+
<field name="implementation_report_path" required="true" type="string" desc="Path to mobile development report"/>
|
|
10
|
+
<field name="source_root" required="true" type="string" desc="Root directory of mobile source code"/>
|
|
11
|
+
<field name="platform_id" required="true" type="string" desc="Mobile platform (mobile-uniapp, mobile-flutter, mobile-react-native)"/>
|
|
12
|
+
<field name="task_id" required="true" type="string" desc="Task identifier from dispatch context"/>
|
|
13
|
+
<field name="api_contract_path" required="false" type="string" desc="Path to API contract file"/>
|
|
14
|
+
<field name="previous_review_path" required="false" type="string" desc="Path to previous review report"/>
|
|
15
|
+
</block>
|
|
16
|
+
|
|
17
|
+
<!-- ============================================================
|
|
18
|
+
Global Constraints
|
|
19
|
+
============================================================ -->
|
|
20
|
+
<block type="rule" id="R1" level="forbidden" desc="Review operation constraints">
|
|
21
|
+
<field name="text">NEVER modify source code files - read-only operation</field>
|
|
22
|
+
<field name="text">Do NOT attempt to fix issues - only document them</field>
|
|
23
|
+
</block>
|
|
24
|
+
|
|
25
|
+
<block type="rule" id="R2" level="mandatory" desc="Output requirements">
|
|
26
|
+
<field name="text">PARTIAL/FAIL results MUST include specific Re-dispatch Guidance</field>
|
|
27
|
+
<field name="text">Skip items already marked as passed in previous review</field>
|
|
28
|
+
</block>
|
|
29
|
+
|
|
30
|
+
<!-- ============================================================
|
|
31
|
+
Main Processing Sequence
|
|
32
|
+
============================================================ -->
|
|
33
|
+
<sequence id="S1" name="Mobile Code Review" status="pending" desc="Execute mobile code review workflow">
|
|
34
|
+
|
|
35
|
+
<!-- Step 1: Load Documents -->
|
|
36
|
+
<block type="task" id="B1" action="validate" desc="Validate Inputs">
|
|
37
|
+
<field name="checks">Verify all required parameters provided</field>
|
|
38
|
+
<field name="on_fail">Report error and stop</field>
|
|
39
|
+
<field name="output" var="validation_result"/>
|
|
40
|
+
</block>
|
|
41
|
+
|
|
42
|
+
<block type="task" id="B2" action="read-file" desc="Read Design Document">
|
|
43
|
+
<field name="path" value="${design_doc_path}"/>
|
|
44
|
+
<field name="output" var="design_doc"/>
|
|
45
|
+
</block>
|
|
46
|
+
|
|
47
|
+
<block type="task" id="B3" action="analyze" desc="Extract from Design Document">
|
|
48
|
+
<field name="input" value="${design_doc}"/>
|
|
49
|
+
<field name="extraction">
|
|
50
|
+
- Module Overview
|
|
51
|
+
- Page/Component Structure
|
|
52
|
+
- Native Features
|
|
53
|
+
- Offline Support requirements
|
|
54
|
+
</field>
|
|
55
|
+
<field name="output" var="design_specs"/>
|
|
56
|
+
</block>
|
|
57
|
+
|
|
58
|
+
<block type="task" id="B4" action="read-file" desc="Read Implementation Report">
|
|
59
|
+
<field name="path" value="${implementation_report_path}"/>
|
|
60
|
+
<field name="output" var="impl_report"/>
|
|
61
|
+
</block>
|
|
62
|
+
|
|
63
|
+
<block type="task" id="B5" action="analyze" desc="Extract from Implementation Report">
|
|
64
|
+
<field name="input" value="${impl_report}"/>
|
|
65
|
+
<field name="extraction">Completed Files, Implementation Status, Known Issues</field>
|
|
66
|
+
<field name="output" var="impl_status"/>
|
|
67
|
+
</block>
|
|
68
|
+
|
|
69
|
+
<!-- Conditional: Read API Contract -->
|
|
70
|
+
<block type="gateway" id="G1" mode="exclusive" desc="Check if API contract provided">
|
|
71
|
+
<branch test="${api_contract_path} != null" name="Has API Contract">
|
|
72
|
+
<block type="task" id="B6" action="read-file" desc="Read API Contract">
|
|
73
|
+
<field name="path" value="${api_contract_path}"/>
|
|
74
|
+
<field name="output" var="api_contract"/>
|
|
75
|
+
</block>
|
|
76
|
+
</branch>
|
|
77
|
+
<branch default="true" name="No API Contract">
|
|
78
|
+
<block type="event" id="E1" action="log" level="info" desc="Skip API validation">
|
|
79
|
+
<field name="message">API contract not provided - skipping API validation</field>
|
|
80
|
+
</block>
|
|
81
|
+
</branch>
|
|
82
|
+
</block>
|
|
83
|
+
|
|
84
|
+
<!-- Step 2: File Completeness Check -->
|
|
85
|
+
<block type="task" id="B7" action="analyze" desc="Build Expected File List">
|
|
86
|
+
<field name="categories">
|
|
87
|
+
- Pages: pages/**/* or screens/**/* (e.g., pages/user/index.vue)
|
|
88
|
+
- Components: components/**/* (e.g., components/UserCard.vue)
|
|
89
|
+
- Store: store/**/* (e.g., store/user.js)
|
|
90
|
+
- API: api/**/* or services/**/* (e.g., api/user.js)
|
|
91
|
+
- Utils: utils/**/* (e.g., utils/permission.js)
|
|
92
|
+
- Native Modules: native/**/* or plugins/**/* (e.g., native/bridge.js)
|
|
93
|
+
</field>
|
|
94
|
+
<field name="output" var="expected_files"/>
|
|
95
|
+
</block>
|
|
96
|
+
|
|
97
|
+
<block type="task" id="B8" action="analyze" desc="Scan Actual Files">
|
|
98
|
+
<field name="source_root" value="${source_root}"/>
|
|
99
|
+
<field name="action">Use Glob to scan for implemented files</field>
|
|
100
|
+
<field name="output" var="actual_files"/>
|
|
101
|
+
</block>
|
|
102
|
+
|
|
103
|
+
<block type="task" id="B9" action="analyze" desc="Calculate Completeness">
|
|
104
|
+
<field name="formula">Generate completeness matrix and percentage</field>
|
|
105
|
+
<field name="output" var="completeness_result"/>
|
|
106
|
+
</block>
|
|
107
|
+
|
|
108
|
+
<!-- Step 3: Mobile-Specific Compliance Check -->
|
|
109
|
+
<block type="task" id="B10" action="analyze" desc="Mobile Component Check">
|
|
110
|
+
<field name="checks">
|
|
111
|
+
- Platform Components: Uses correct platform-specific components - Severity: ERROR
|
|
112
|
+
- Component Reuse: Components appropriately reusable - Severity: WARN
|
|
113
|
+
- Native Component Usage: Proper use of native UI components - Severity: WARN
|
|
114
|
+
</field>
|
|
115
|
+
<field name="output" var="component_check"/>
|
|
116
|
+
</block>
|
|
117
|
+
|
|
118
|
+
<block type="task" id="B11" action="analyze" desc="Platform Adaptation Validation">
|
|
119
|
+
<field name="checks">
|
|
120
|
+
- iOS/Android Differences: Platform-specific differences handled - Severity: ERROR
|
|
121
|
+
- Screen Adaptation: Different screen sizes handled - Severity: ERROR
|
|
122
|
+
- Safe Area: Safe area insets respected - Severity: ERROR
|
|
123
|
+
- Platform APIs: Platform-specific APIs correctly used - Severity: WARN
|
|
124
|
+
</field>
|
|
125
|
+
<field name="output" var="platform_check"/>
|
|
126
|
+
</block>
|
|
127
|
+
|
|
128
|
+
<block type="task" id="B12" action="analyze" desc="Permission Handling Check">
|
|
129
|
+
<field name="checks">
|
|
130
|
+
- Runtime Permissions: Runtime permission requests implemented - Severity: ERROR
|
|
131
|
+
- Permission Rationale: User-friendly permission explanations - Severity: WARN
|
|
132
|
+
- Denial Handling: Graceful handling of permission denial - Severity: ERROR
|
|
133
|
+
</field>
|
|
134
|
+
<field name="output" var="permission_check"/>
|
|
135
|
+
</block>
|
|
136
|
+
|
|
137
|
+
<block type="task" id="B13" action="analyze" desc="Offline Support Validation">
|
|
138
|
+
<field name="checks">
|
|
139
|
+
- Local Storage: Data caching implemented where required - Severity: ERROR
|
|
140
|
+
- Sync Mechanism: Offline data sync strategy implemented - Severity: ERROR
|
|
141
|
+
- Network State: Network connectivity handling - Severity: ERROR
|
|
142
|
+
- Queue Management: Pending request queue management - Severity: WARN
|
|
143
|
+
</field>
|
|
144
|
+
<field name="output" var="offline_check"/>
|
|
145
|
+
</block>
|
|
146
|
+
|
|
147
|
+
<block type="task" id="B14" action="analyze" desc="Performance Check">
|
|
148
|
+
<field name="checks">
|
|
149
|
+
- List Rendering: Virtual scrolling for long lists - Severity: ERROR
|
|
150
|
+
- Image Optimization: Image lazy loading and caching - Severity: WARN
|
|
151
|
+
- Memory Management: Proper cleanup of listeners/timers - Severity: ERROR
|
|
152
|
+
- Bundle Size: Code splitting where appropriate - Severity: WARN
|
|
153
|
+
</field>
|
|
154
|
+
<field name="output" var="performance_check"/>
|
|
155
|
+
</block>
|
|
156
|
+
|
|
157
|
+
<!-- Step 4: Generate Review Report -->
|
|
158
|
+
<block type="task" id="B15" action="analyze" desc="Determine Result">
|
|
159
|
+
<field name="criteria">
|
|
160
|
+
- PASS: 100% files created, 0 ERROR-level issues
|
|
161
|
+
- PARTIAL: 70-99% files created, or non-critical ERROR issues
|
|
162
|
+
- FAIL: <70% files created, or critical blockers present
|
|
163
|
+
</field>
|
|
164
|
+
<field name="output" var="review_result"/>
|
|
165
|
+
</block>
|
|
166
|
+
|
|
167
|
+
<block type="task" id="B16" action="read-file" desc="Read Review Report Template">
|
|
168
|
+
<field name="path">templates/REVIEW-REPORT-TEMPLATE.md</field>
|
|
169
|
+
<field name="output" var="report_template"/>
|
|
170
|
+
</block>
|
|
171
|
+
|
|
172
|
+
<block type="task" id="B17" action="generate" desc="Write Review Report">
|
|
173
|
+
<field name="path">speccrew-workspace/iterations/{number}-{type}-{name}/04.development/{platform_id}/[module]-review-report.md</field>
|
|
174
|
+
<field name="template" value="${report_template}"/>
|
|
175
|
+
<field name="content">
|
|
176
|
+
- Completeness: ${completeness_result}
|
|
177
|
+
- Component Check: ${component_check}
|
|
178
|
+
- Platform Adaptation: ${platform_check}
|
|
179
|
+
- Permission Handling: ${permission_check}
|
|
180
|
+
- Offline Support: ${offline_check}
|
|
181
|
+
- Performance Check: ${performance_check}
|
|
182
|
+
- Final Result: ${review_result}
|
|
183
|
+
</field>
|
|
184
|
+
<field name="output" var="review_report_path"/>
|
|
185
|
+
</block>
|
|
186
|
+
|
|
187
|
+
<!-- Step 5: Task Completion Report -->
|
|
188
|
+
<block type="task" id="B18" action="report" desc="Generate Task Completion Report">
|
|
189
|
+
<field name="template">
|
|
190
|
+
## Task Completion Report
|
|
191
|
+
- **Status**: SUCCESS
|
|
192
|
+
- **Task ID**: review-{original_task_id}
|
|
193
|
+
- **Platform**: {platform_id}
|
|
194
|
+
- **Module**: {module_name}
|
|
195
|
+
- **Output Files**: {review_report_path}
|
|
196
|
+
- **Summary**: Review {result}: {completed}/{total} files, {error_count} errors
|
|
197
|
+
</field>
|
|
198
|
+
<field name="output" var="completion_report"/>
|
|
199
|
+
</block>
|
|
200
|
+
|
|
201
|
+
</sequence>
|
|
202
|
+
|
|
203
|
+
<!-- ============================================================
|
|
204
|
+
Output Results
|
|
205
|
+
============================================================ -->
|
|
206
|
+
<block type="output" id="O1" desc="Workflow output results">
|
|
207
|
+
<field name="review_report_path" value="${review_report_path}" type="string" desc="Path to review report"/>
|
|
208
|
+
<field name="review_result" value="${review_result}" type="string" desc="PASS/PARTIAL/FAIL verdict"/>
|
|
209
|
+
<field name="completeness_pct" type="number" desc="File completeness percentage"/>
|
|
210
|
+
<field name="error_count" type="number" desc="Number of ERROR-level issues"/>
|
|
211
|
+
<field name="completion_report" value="${completion_report}" type="string" desc="Task completion report"/>
|
|
212
|
+
</block>
|
|
213
|
+
|
|
214
|
+
</workflow>
|
|
@@ -9,7 +9,13 @@ tools: Read, Write, Glob, Grep
|
|
|
9
9
|
- Automatically triggered by speccrew-fd-feature-design Skill after feature spec document completion
|
|
10
10
|
- User requests "Generate API documentation" or "Define API contract"
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
## AgentFlow Definition
|
|
13
|
+
|
|
14
|
+
<!-- @agentflow: workflow.agentflow.xml -->
|
|
15
|
+
|
|
16
|
+
> **REQUIRED**: Before executing this workflow, read the XML workflow specification: `speccrew-workspace/docs/rules/agentflow-spec.md`
|
|
17
|
+
|
|
18
|
+
## Workflow
|
|
13
19
|
|
|
14
20
|
## Absolute Constraints
|
|
15
21
|
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<workflow id="api-contract-main" status="pending" version="1.0" desc="API Contract Generation workflow">
|
|
3
|
+
|
|
4
|
+
<!-- ============================================================
|
|
5
|
+
Input Parameters Definition
|
|
6
|
+
============================================================ -->
|
|
7
|
+
<block type="input" id="I1" desc="Workflow input parameters">
|
|
8
|
+
<field name="feature_id" required="false" type="string" desc="Feature identifier, e.g., F-CRM-01"/>
|
|
9
|
+
<field name="feature_name" required="false" type="string" desc="Feature name, e.g., customer-list"/>
|
|
10
|
+
<field name="iteration_path" required="true" type="string" desc="Absolute path to iteration directory"/>
|
|
11
|
+
<field name="workspace_path" required="true" type="string" desc="Absolute path to speccrew-workspace"/>
|
|
12
|
+
</block>
|
|
13
|
+
|
|
14
|
+
<!-- ============================================================
|
|
15
|
+
Global Constraints
|
|
16
|
+
============================================================ -->
|
|
17
|
+
<block type="rule" id="R1" level="forbidden" desc="Document creation constraints">
|
|
18
|
+
<field name="text">NEVER use create_file to write the API contract document directly</field>
|
|
19
|
+
<field name="text">MUST create by copying template then filling with search_replace</field>
|
|
20
|
+
<field name="text">create_file produces truncated output on large files</field>
|
|
21
|
+
</block>
|
|
22
|
+
|
|
23
|
+
<block type="rule" id="R2" level="forbidden" desc="Full-file rewrite prohibition">
|
|
24
|
+
<field name="text">NEVER replace entire document content in single operation</field>
|
|
25
|
+
<field name="text">ALWAYS use targeted search_replace on specific sections</field>
|
|
26
|
+
</block>
|
|
27
|
+
|
|
28
|
+
<block type="rule" id="R3" level="mandatory" desc="Template-first workflow">
|
|
29
|
+
<field name="text">Step 4a (copy template) MUST execute before Step 4b (fill sections)</field>
|
|
30
|
+
<field name="text">Skipping template copy is FORBIDDEN</field>
|
|
31
|
+
</block>
|
|
32
|
+
|
|
33
|
+
<!-- ============================================================
|
|
34
|
+
Main Processing Sequence
|
|
35
|
+
============================================================ -->
|
|
36
|
+
<sequence id="S1" name="API Contract Generation" status="pending" desc="Generate API contract from feature spec">
|
|
37
|
+
|
|
38
|
+
<!-- Step 1: Read Feature Spec -->
|
|
39
|
+
<block type="task" id="B1" action="read-file" desc="Read Feature Spec document">
|
|
40
|
+
<field name="path">${iteration_path}/02.feature-design/${feature_id}-${feature_name}-feature-spec.md</field>
|
|
41
|
+
<field name="fallback_path">${iteration_path}/02.feature-design/${feature_name}-feature-spec.md</field>
|
|
42
|
+
<field name="output" var="feature_spec"/>
|
|
43
|
+
</block>
|
|
44
|
+
|
|
45
|
+
<!-- Gateway: Validate Feature Spec exists -->
|
|
46
|
+
<block type="gateway" id="G1" mode="guard" desc="Verify Feature Spec exists"
|
|
47
|
+
test="${feature_spec} != null" fail-action="stop">
|
|
48
|
+
<field name="message">Feature Spec document not found. Check path: ${iteration_path}/02.feature-design/</field>
|
|
49
|
+
</block>
|
|
50
|
+
|
|
51
|
+
<!-- Step 2: Read API Contract Template -->
|
|
52
|
+
<block type="task" id="B2" action="read-file" desc="Read API Contract template">
|
|
53
|
+
<field name="path">speccrew-fd-api-contract/templates/API-CONTRACT-TEMPLATE.md</field>
|
|
54
|
+
<field name="output" var="template_content"/>
|
|
55
|
+
</block>
|
|
56
|
+
|
|
57
|
+
<!-- Gateway: Validate template exists -->
|
|
58
|
+
<block type="gateway" id="G2" mode="guard" desc="Verify template exists"
|
|
59
|
+
test="${template_content} != null" fail-action="stop">
|
|
60
|
+
<field name="message">API Contract template not found at speccrew-fd-api-contract/templates/API-CONTRACT-TEMPLATE.md</field>
|
|
61
|
+
</block>
|
|
62
|
+
|
|
63
|
+
<!-- Step 3: Extract and Organize API List -->
|
|
64
|
+
<block type="task" id="B3" action="analyze" desc="Extract API list from Feature Spec">
|
|
65
|
+
<field name="input" value="${feature_spec}"/>
|
|
66
|
+
<field name="extraction_rules">
|
|
67
|
+
- Extract all API endpoints from Section 2 (Function Details)
|
|
68
|
+
- Identify HTTP method (GET/POST/PUT/DELETE)
|
|
69
|
+
- Extract URL pattern following RESTful conventions
|
|
70
|
+
- Identify caller (Frontend/Backend/External)
|
|
71
|
+
- Build API list table
|
|
72
|
+
</field>
|
|
73
|
+
<field name="output" var="api_list"/>
|
|
74
|
+
</block>
|
|
75
|
+
|
|
76
|
+
<!-- Step 4a: Copy Template to Document Path -->
|
|
77
|
+
<block type="task" id="B4" action="generate" desc="Copy template and create document skeleton">
|
|
78
|
+
<field name="template" value="${template_content}"/>
|
|
79
|
+
<field name="placeholders">
|
|
80
|
+
- [Feature Name] → ${feature_name}
|
|
81
|
+
- {Feature ID} → ${feature_id}
|
|
82
|
+
- {Date} → current date
|
|
83
|
+
</field>
|
|
84
|
+
<field name="output_path">${iteration_path}/02.feature-design/${feature_id}-${feature_name}-api-contract.md</field>
|
|
85
|
+
<field name="fallback_path">${iteration_path}/02.feature-design/${feature_name}-api-contract.md</field>
|
|
86
|
+
<field name="output" var="document_created"/>
|
|
87
|
+
</block>
|
|
88
|
+
|
|
89
|
+
<!-- Checkpoint: Verify document created -->
|
|
90
|
+
<block type="checkpoint" id="CP1" name="document-created" desc="Verify API contract document created">
|
|
91
|
+
<field name="file" value="${iteration_path}/02.feature-design/${feature_id}-${feature_name}-api-contract.md"/>
|
|
92
|
+
<field name="verify" value="file_exists(${iteration_path}/02.feature-design/${feature_id}-${feature_name}-api-contract.md)"/>
|
|
93
|
+
</block>
|
|
94
|
+
|
|
95
|
+
<!-- Step 4b: Fill API List Overview Section -->
|
|
96
|
+
<block type="task" id="B5" action="edit-file" desc="Fill API List Overview section">
|
|
97
|
+
<field name="path">${iteration_path}/02.feature-design/${feature_id}-${feature_name}-api-contract.md</field>
|
|
98
|
+
<field name="fallback_path">${iteration_path}/02.feature-design/${feature_name}-api-contract.md</field>
|
|
99
|
+
<field name="operation">search_replace</field>
|
|
100
|
+
<field name="search">## API List Overview
|
|
101
|
+
|
|
102
|
+
[TO BE FILLED]</field>
|
|
103
|
+
<field name="replace">## API List Overview
|
|
104
|
+
|
|
105
|
+
| API Name | Method | URL | Description | Caller |
|
|
106
|
+
|----------|--------|-----|-------------|--------|
|
|
107
|
+
${api_list.table}</field>
|
|
108
|
+
<field name="output" var="section_1_filled"/>
|
|
109
|
+
</block>
|
|
110
|
+
|
|
111
|
+
<!-- Step 5: Define Contract for Each API -->
|
|
112
|
+
<block type="loop" id="L1" over="${api_list.apis}" as="api" desc="Define contract for each API">
|
|
113
|
+
<block type="task" id="B6" action="analyze" desc="Define API contract details">
|
|
114
|
+
<field name="input" value="${api}">${feature_spec}</field>
|
|
115
|
+
<field name="definition_rules">
|
|
116
|
+
- Request method, URL, authentication required
|
|
117
|
+
- Request parameters (type, required, example values)
|
|
118
|
+
- Response structure (type and description for each field)
|
|
119
|
+
- Success response example (JSON)
|
|
120
|
+
- Error code list
|
|
121
|
+
</field>
|
|
122
|
+
<field name="output" var="api_contract_details"/>
|
|
123
|
+
</block>
|
|
124
|
+
|
|
125
|
+
<block type="task" id="B7" action="edit-file" desc="Fill API contract section">
|
|
126
|
+
<field name="path">${iteration_path}/02.feature-design/${feature_id}-${feature_name}-api-contract.md</field>
|
|
127
|
+
<field name="fallback_path">${iteration_path}/02.feature-design/${feature_name}-api-contract.md</field>
|
|
128
|
+
<field name="operation">search_replace</field>
|
|
129
|
+
<field name="search">### ${api.name}
|
|
130
|
+
|
|
131
|
+
[TO BE FILLED]</field>
|
|
132
|
+
<field name="replace">### ${api.name}
|
|
133
|
+
|
|
134
|
+
${api_contract_details.content}</field>
|
|
135
|
+
</block>
|
|
136
|
+
</block>
|
|
137
|
+
|
|
138
|
+
<!-- Step 6: Fill Error Code Summary -->
|
|
139
|
+
<block type="task" id="B8" action="edit-file" desc="Fill Error Code Summary section">
|
|
140
|
+
<field name="path">${iteration_path}/02.feature-design/${feature_id}-${feature_name}-api-contract.md</field>
|
|
141
|
+
<field name="fallback_path">${iteration_path}/02.feature-design/${feature_name}-api-contract.md</field>
|
|
142
|
+
<field name="operation">search_replace</field>
|
|
143
|
+
<field name="search">## Error Code Summary
|
|
144
|
+
|
|
145
|
+
[TO BE FILLED]</field>
|
|
146
|
+
<field name="replace">## Error Code Summary
|
|
147
|
+
|
|
148
|
+
| Error Code | Description | HTTP Status |
|
|
149
|
+
|------------|-------------|-------------|
|
|
150
|
+
${api_list.error_codes}</field>
|
|
151
|
+
</block>
|
|
152
|
+
|
|
153
|
+
<!-- Step 7: Joint Confirmation -->
|
|
154
|
+
<block type="gateway" id="G3" mode="exclusive" desc="Select confirmation mode">
|
|
155
|
+
<branch test="${feature_id} != null" name="Feature-granular confirmation">
|
|
156
|
+
<block type="event" id="E1" action="confirm" title="Feature Design Confirmation" type="yesno" desc="Request user confirmation for feature">
|
|
157
|
+
<field name="preview">Feature design phase deliverables ready:
|
|
158
|
+
|
|
159
|
+
Feature ID: ${feature_id}
|
|
160
|
+
Feature Name: ${feature_name}
|
|
161
|
+
|
|
162
|
+
Documents:
|
|
163
|
+
- Feature Spec: ${iteration_path}/02.feature-design/${feature_id}-${feature_name}-feature-spec.md
|
|
164
|
+
- API Contract: ${iteration_path}/02.feature-design/${feature_id}-${feature_name}-api-contract.md
|
|
165
|
+
|
|
166
|
+
Please confirm:
|
|
167
|
+
1. Is the technical solution feasible?
|
|
168
|
+
2. Does the API definition meet frontend requirements?
|
|
169
|
+
3. Is the data model reasonable?
|
|
170
|
+
|
|
171
|
+
After confirmation, API Contract becomes the sole baseline for frontend-backend collaboration.</field>
|
|
172
|
+
</block>
|
|
173
|
+
</branch>
|
|
174
|
+
<branch default="true" name="Module-level confirmation">
|
|
175
|
+
<block type="event" id="E2" action="confirm" title="Feature Design Confirmation" type="yesno" desc="Request user confirmation">
|
|
176
|
+
<field name="preview">Feature design phase deliverables ready:
|
|
177
|
+
- Feature Spec: ${iteration_path}/02.feature-design/${feature_name}-feature-spec.md
|
|
178
|
+
- API Contract: ${iteration_path}/02.feature-design/${feature_name}-api-contract.md
|
|
179
|
+
|
|
180
|
+
Please confirm:
|
|
181
|
+
1. Is the overall technical solution feasible?
|
|
182
|
+
2. Does the API definition meet frontend requirements?
|
|
183
|
+
3. Is the data model reasonable?
|
|
184
|
+
|
|
185
|
+
After confirmation, API Contract becomes the sole baseline for frontend-backend collaboration.</field>
|
|
186
|
+
</block>
|
|
187
|
+
</branch>
|
|
188
|
+
</block>
|
|
189
|
+
|
|
190
|
+
<!-- Step 8a: Update Checkpoints File -->
|
|
191
|
+
<block type="task" id="B9" action="run-script" desc="Update checkpoints via script">
|
|
192
|
+
<field name="command">node "${workspace_path}/scripts/update-progress.js" write-checkpoint --file "${iteration_path}/02.feature-design/.checkpoints.json" --stage 02_feature_design --checkpoint api_contract_joint --passed true</field>
|
|
193
|
+
<field name="output" var="checkpoint_result"/>
|
|
194
|
+
</block>
|
|
195
|
+
|
|
196
|
+
<!-- Step 8b: Update Workflow Progress -->
|
|
197
|
+
<block type="gateway" id="G4" mode="exclusive" desc="Update progress based on mode">
|
|
198
|
+
<branch test="${feature_id} != null" name="Feature mode">
|
|
199
|
+
<block type="task" id="B10" action="run-script" desc="Update workflow progress for feature">
|
|
200
|
+
<field name="command">node "${workspace_path}/scripts/update-progress.js" update-task --file "${iteration_path}/WORKFLOW-PROGRESS.json" --task-id "${feature_id}" --status confirmed --outputs '["02.feature-design/${feature_id}-${feature_name}-feature-spec.md","02.feature-design/${feature_id}-${feature_name}-api-contract.md"]'</field>
|
|
201
|
+
</block>
|
|
202
|
+
</branch>
|
|
203
|
+
<branch default="true" name="Module mode">
|
|
204
|
+
<block type="task" id="B11" action="run-script" desc="Update workflow progress for module">
|
|
205
|
+
<field name="command">node "${workspace_path}/scripts/update-progress.js" update-stage --file "${iteration_path}/WORKFLOW-PROGRESS.json" --stage 02_feature_design --status confirmed --outputs '["02.feature-design/${feature_name}-feature-spec.md","02.feature-design/${feature_name}-api-contract.md"]'</field>
|
|
206
|
+
</block>
|
|
207
|
+
</branch>
|
|
208
|
+
</block>
|
|
209
|
+
|
|
210
|
+
</sequence>
|
|
211
|
+
|
|
212
|
+
<!-- ============================================================
|
|
213
|
+
Output Results
|
|
214
|
+
============================================================ -->
|
|
215
|
+
<block type="output" id="O1" desc="Workflow output results">
|
|
216
|
+
<field name="api_contract_path" value="${iteration_path}/02.feature-design/${feature_id}-${feature_name}-api-contract.md" type="string" desc="Path to generated API contract"/>
|
|
217
|
+
<field name="feature_spec_path" value="${iteration_path}/02.feature-design/${feature_id}-${feature_name}-feature-spec.md" type="string" desc="Path to Feature Spec"/>
|
|
218
|
+
<field name="api_count" from="${api_list.count}" type="number" desc="Number of APIs documented"/>
|
|
219
|
+
<field name="confirmation_status" value="confirmed" type="string" desc="User confirmation status"/>
|
|
220
|
+
</block>
|
|
221
|
+
|
|
222
|
+
</workflow>
|
|
@@ -22,7 +22,13 @@ This skill applies ISA-95 Stages 1-3 as an internal thinking framework for analy
|
|
|
22
22
|
- Feature Designer Agent needs to decompose PRD into functions before design
|
|
23
23
|
- User asks "Analyze this feature" or "Break down this requirement"
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
## AgentFlow Definition
|
|
26
|
+
|
|
27
|
+
<!-- @agentflow: workflow.agentflow.xml -->
|
|
28
|
+
|
|
29
|
+
> **REQUIRED**: Before executing this workflow, read the XML workflow specification: `speccrew-workspace/docs/rules/agentflow-spec.md`
|
|
30
|
+
|
|
31
|
+
## Workflow
|
|
26
32
|
|
|
27
33
|
**MANDATORY:**
|
|
28
34
|
- **Business Perspective Only** — Feature Analysis is a PURE BUSINESS document. It describes WHAT the system does from a business/user perspective, NOT HOW it's technically implemented.
|