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
@@ -0,0 +1,214 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <workflow id="dev-review-desktop" status="pending" version="1.0" desc="Desktop Code Review - Reviews desktop app implementation against design and security standards">
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 desktop module design document"/>
9
+ <field name="implementation_report_path" required="true" type="string" desc="Path to desktop development report"/>
10
+ <field name="source_root" required="true" type="string" desc="Root directory of desktop source code"/>
11
+ <field name="platform_id" required="true" type="string" desc="Desktop platform (desktop-tauri, desktop-electron)"/>
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="Desktop Code Review" status="pending" desc="Execute desktop 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
+ - Process Architecture
52
+ - IPC Contracts
53
+ - Native Integration points
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
+ - Main Process: src-tauri/src/**/*.rs or main/**/* (e.g., src-tauri/src/main.rs)
88
+ - Renderer: src/**/* (frontend files, e.g., src/App.vue)
89
+ - Preload: preload/**/* or src-tauri/src/preload.rs
90
+ - IPC Handlers: src-tauri/src/commands/**/*.rs
91
+ - Native Modules: native/**/*
92
+ </field>
93
+ <field name="output" var="expected_files"/>
94
+ </block>
95
+
96
+ <block type="task" id="B8" action="analyze" desc="Scan Actual Files">
97
+ <field name="source_root" value="${source_root}"/>
98
+ <field name="action">Use Glob to scan for implemented files</field>
99
+ <field name="output" var="actual_files"/>
100
+ </block>
101
+
102
+ <block type="task" id="B9" action="analyze" desc="Calculate Completeness">
103
+ <field name="formula">Generate completeness matrix and percentage</field>
104
+ <field name="output" var="completeness_result"/>
105
+ </block>
106
+
107
+ <!-- Step 3: Desktop-Specific Compliance Check -->
108
+ <block type="task" id="B10" action="analyze" desc="Process Separation Validation">
109
+ <field name="checks">
110
+ - Main/Renderer Separation: Business logic in main process only - Severity: CRITICAL
111
+ - No Node in Renderer: Renderer has no direct Node.js access - Severity: CRITICAL
112
+ - Context Isolation: contextIsolation enabled - Severity: CRITICAL
113
+ </field>
114
+ <field name="output" var="process_check"/>
115
+ </block>
116
+
117
+ <block type="task" id="B11" action="analyze" desc="IPC Channel Consistency Check">
118
+ <field name="checks">
119
+ - Channel Naming: IPC channels follow naming convention - Severity: ERROR
120
+ - Type Safety: IPC payloads properly typed - Severity: ERROR
121
+ - Channel Registration: All channels registered in preload - Severity: ERROR
122
+ - Bidirectional Safety: No unsafe IPC patterns - Severity: CRITICAL
123
+ </field>
124
+ <field name="output" var="ipc_check"/>
125
+ </block>
126
+
127
+ <block type="task" id="B12" action="analyze" desc="Security Isolation Check">
128
+ <field name="checks">
129
+ - contextBridge: Uses contextBridge for API exposure - Severity: CRITICAL
130
+ - Preload Script: Preload script properly configured - Severity: CRITICAL
131
+ - CSP Headers: Content Security Policy configured - Severity: ERROR
132
+ - Remote Content: No unsafe remote content loading - Severity: CRITICAL
133
+ </field>
134
+ <field name="output" var="security_check"/>
135
+ </block>
136
+
137
+ <block type="task" id="B13" action="analyze" desc="Native Integration Check">
138
+ <field name="checks">
139
+ - File System: File operations in main process only - Severity: CRITICAL
140
+ - System Notifications: Notifications properly implemented - Severity: WARN
141
+ - Native Menus: Menu structure matches design - Severity: ERROR
142
+ - System Tray: Tray implementation if required - Severity: ERROR
143
+ </field>
144
+ <field name="output" var="native_check"/>
145
+ </block>
146
+
147
+ <block type="task" id="B14" action="analyze" desc="Packaging Configuration Check">
148
+ <field name="checks">
149
+ - Build Config: Build configuration complete - Severity: ERROR
150
+ - Assets: Required assets included - Severity: ERROR
151
+ - Signing: Code signing configured (if required) - Severity: WARN
152
+ - Auto-Update: Auto-update mechanism (if required) - Severity: WARN
153
+ </field>
154
+ <field name="output" var="packaging_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: &lt;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
+ - Process Separation: ${process_check}
178
+ - IPC Check: ${ipc_check}
179
+ - Security Check: ${security_check}
180
+ - Native Integration: ${native_check}
181
+ - Packaging Check: ${packaging_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>
@@ -23,9 +23,17 @@ tools: Read, Glob, Grep
23
23
  | `task_id` | Yes | Task identifier from dispatch context |
24
24
  | `previous_review_path` | No | Path to previous review report |
25
25
 
26
- # Workflow
26
+ ## AgentFlow Definition
27
27
 
28
- ## Absolute Constraints
28
+ <!-- @agentflow: workflow.agentflow.xml -->
29
+
30
+ > **REQUIRED**: Before executing this workflow, read the XML workflow specification: `speccrew-workspace/docs/rules/agentflow-spec.md`
31
+
32
+ ---
33
+
34
+ ## Workflow
35
+
36
+ ### Absolute Constraints
29
37
 
30
38
  > **Violation = review failure.**
31
39
 
@@ -0,0 +1,213 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <workflow id="dev-review-frontend" status="pending" version="1.0" desc="Frontend Code Review - Reviews web frontend 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 frontend module design document"/>
9
+ <field name="implementation_report_path" required="true" type="string" desc="Path to frontend development report"/>
10
+ <field name="source_root" required="true" type="string" desc="Root directory of frontend source code"/>
11
+ <field name="platform_id" required="true" type="string" desc="Frontend platform (web-vue, web-react)"/>
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="Frontend Code Review" status="pending" desc="Execute frontend 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
+ - Component Structure
52
+ - Store Modules
53
+ - Routes
54
+ - API Integration points
55
+ </field>
56
+ <field name="output" var="design_specs"/>
57
+ </block>
58
+
59
+ <block type="task" id="B4" action="read-file" desc="Read Implementation Report">
60
+ <field name="path" value="${implementation_report_path}"/>
61
+ <field name="output" var="impl_report"/>
62
+ </block>
63
+
64
+ <block type="task" id="B5" action="analyze" desc="Extract from Implementation Report">
65
+ <field name="input" value="${impl_report}"/>
66
+ <field name="extraction">Completed Files, Implementation Status, Known Issues</field>
67
+ <field name="output" var="impl_status"/>
68
+ </block>
69
+
70
+ <!-- Conditional: Read API Contract -->
71
+ <block type="gateway" id="G1" mode="exclusive" desc="Check if API contract provided">
72
+ <branch test="${api_contract_path} != null" name="Has API Contract">
73
+ <block type="task" id="B6" action="read-file" desc="Read API Contract">
74
+ <field name="path" value="${api_contract_path}"/>
75
+ <field name="output" var="api_contract"/>
76
+ </block>
77
+ </branch>
78
+ <branch default="true" name="No API Contract">
79
+ <block type="event" id="E1" action="log" level="info" desc="Skip API validation">
80
+ <field name="message">API contract not provided - skipping API validation</field>
81
+ </block>
82
+ </branch>
83
+ </block>
84
+
85
+ <!-- Step 2: File Completeness Check -->
86
+ <block type="task" id="B7" action="analyze" desc="Build Expected File List">
87
+ <field name="categories">
88
+ - Components: components/**/*.vue or **/*.tsx (e.g., components/UserForm.vue)
89
+ - Views/Pages: views/**/*.vue or pages/**/*.tsx (e.g., views/UserList.vue)
90
+ - Store: store/**/*.ts or stores/**/*.ts (e.g., store/userStore.ts)
91
+ - API Clients: api/**/*.ts or services/**/*.ts (e.g., api/userApi.ts)
92
+ - Routes: router/**/*.ts (e.g., router/index.ts)
93
+ - Styles: styles/**/*.scss or **/*.module.css (e.g., styles/variables.scss)
94
+ </field>
95
+ <field name="output" var="expected_files"/>
96
+ </block>
97
+
98
+ <block type="task" id="B8" action="analyze" desc="Scan Actual Files">
99
+ <field name="source_root" value="${source_root}"/>
100
+ <field name="action">Use Glob to scan for implemented files</field>
101
+ <field name="output" var="actual_files"/>
102
+ </block>
103
+
104
+ <block type="task" id="B9" action="analyze" desc="Calculate Completeness">
105
+ <field name="formula">Generate completeness matrix and percentage</field>
106
+ <field name="output" var="completeness_result"/>
107
+ </block>
108
+
109
+ <!-- Step 3: Frontend-Specific Compliance Check -->
110
+ <block type="task" id="B10" action="analyze" desc="Component Structure Check">
111
+ <field name="checks">
112
+ - Directory Structure: Components in correct directories per design - Severity: ERROR
113
+ - Component Granularity: Components appropriately sized and reusable - Severity: WARN
114
+ - Naming Convention: PascalCase for components, camelCase for composables - Severity: ERROR
115
+ - Props Definition: Props properly typed and documented - Severity: WARN
116
+ </field>
117
+ <field name="output" var="component_check"/>
118
+ </block>
119
+
120
+ <block type="task" id="B11" action="analyze" desc="State Management Check">
121
+ <field name="checks">
122
+ - Store Design: Store modules match design specification - Severity: ERROR
123
+ - Data Flow: Unidirectional data flow followed - Severity: WARN
124
+ - State Mutations: Mutations/actions properly defined - Severity: ERROR
125
+ </field>
126
+ <field name="output" var="store_check"/>
127
+ </block>
128
+
129
+ <block type="task" id="B12" action="analyze" desc="API Call Consistency Check">
130
+ <field name="checks">
131
+ - Endpoint Match: API calls match API contract - Severity: ERROR
132
+ - Error Handling: API errors properly handled - Severity: ERROR
133
+ - Loading States: Loading states implemented - Severity: WARN
134
+ </field>
135
+ <field name="output" var="api_check"/>
136
+ </block>
137
+
138
+ <block type="task" id="B13" action="analyze" desc="Route Definition Validation">
139
+ <field name="checks">
140
+ - Route Match: Routes match design document - Severity: ERROR
141
+ - Lazy Loading: Routes use lazy loading where appropriate - Severity: WARN
142
+ - Navigation Guards: Auth guards implemented where required - Severity: ERROR
143
+ </field>
144
+ <field name="output" var="route_check"/>
145
+ </block>
146
+
147
+ <block type="task" id="B14" action="analyze" desc="Style and Layout Compliance">
148
+ <field name="checks">
149
+ - Style Guide: Follows project style guide - Severity: WARN
150
+ - Responsive: Responsive design implemented - Severity: ERROR
151
+ - Accessibility: Basic accessibility (a11y) compliance - Severity: WARN
152
+ </field>
153
+ <field name="output" var="style_check"/>
154
+ </block>
155
+
156
+ <!-- Step 4: Generate Review Report -->
157
+ <block type="task" id="B15" action="analyze" desc="Determine Result">
158
+ <field name="criteria">
159
+ - PASS: 100% files created, 0 ERROR-level issues
160
+ - PARTIAL: 70-99% files created, or non-critical ERROR issues
161
+ - FAIL: &lt;70% files created, or critical blockers present
162
+ </field>
163
+ <field name="output" var="review_result"/>
164
+ </block>
165
+
166
+ <block type="task" id="B16" action="read-file" desc="Read Review Report Template">
167
+ <field name="path">templates/REVIEW-REPORT-TEMPLATE.md</field>
168
+ <field name="output" var="report_template"/>
169
+ </block>
170
+
171
+ <block type="task" id="B17" action="generate" desc="Write Review Report">
172
+ <field name="path">speccrew-workspace/iterations/{number}-{type}-{name}/04.development/{platform_id}/[module]-review-report.md</field>
173
+ <field name="template" value="${report_template}"/>
174
+ <field name="content">
175
+ - Completeness: ${completeness_result}
176
+ - Component Check: ${component_check}
177
+ - Store Check: ${store_check}
178
+ - API Check: ${api_check}
179
+ - Route Check: ${route_check}
180
+ - Style Check: ${style_check}
181
+ - Final Result: ${review_result}
182
+ </field>
183
+ <field name="output" var="review_report_path"/>
184
+ </block>
185
+
186
+ <!-- Step 5: Task Completion Report -->
187
+ <block type="task" id="B18" action="report" desc="Generate Task Completion Report">
188
+ <field name="template">
189
+ ## Task Completion Report
190
+ - **Status**: SUCCESS
191
+ - **Task ID**: review-{original_task_id}
192
+ - **Platform**: {platform_id}
193
+ - **Module**: {module_name}
194
+ - **Output Files**: {review_report_path}
195
+ - **Summary**: Review {result}: {completed}/{total} files, {error_count} errors
196
+ </field>
197
+ <field name="output" var="completion_report"/>
198
+ </block>
199
+
200
+ </sequence>
201
+
202
+ <!-- ============================================================
203
+ Output Results
204
+ ============================================================ -->
205
+ <block type="output" id="O1" desc="Workflow output results">
206
+ <field name="review_report_path" value="${review_report_path}" type="string" desc="Path to review report"/>
207
+ <field name="review_result" value="${review_result}" type="string" desc="PASS/PARTIAL/FAIL verdict"/>
208
+ <field name="completeness_pct" type="number" desc="File completeness percentage"/>
209
+ <field name="error_count" type="number" desc="Number of ERROR-level issues"/>
210
+ <field name="completion_report" value="${completion_report}" type="string" desc="Task completion report"/>
211
+ </block>
212
+
213
+ </workflow>
@@ -23,9 +23,17 @@ tools: Read, Glob, Grep
23
23
  | `task_id` | Yes | Task identifier from dispatch context |
24
24
  | `previous_review_path` | No | Path to previous review report |
25
25
 
26
- # Workflow
26
+ ## AgentFlow Definition
27
27
 
28
- ## Absolute Constraints
28
+ <!-- @agentflow: workflow.agentflow.xml -->
29
+
30
+ > **REQUIRED**: Before executing this workflow, read the XML workflow specification: `speccrew-workspace/docs/rules/agentflow-spec.md`
31
+
32
+ ---
33
+
34
+ ## Workflow
35
+
36
+ ### Absolute Constraints
29
37
 
30
38
  > **Violation = review failure.**
31
39