speccrew 0.6.42 → 0.6.44

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.
@@ -40,123 +40,201 @@ Generate comprehensive technology documentation for a specific platform by analy
40
40
 
41
41
  > **REQUIRED**: Before executing this workflow, read the XML workflow specification: `docs/rules/xml-workflow-spec.md`
42
42
 
43
- <workflow>
44
-
45
- <!-- Global Rules -->
46
- <rule id="GLOBAL-R1" level="mandatory" description="Continuous Execution: Execute all steps in sequence without interruption. Worker must complete all steps before reporting results." />
47
- <rule id="GLOBAL-R-TECHSTACK" level="mandatory" description="Technology Stack Constraint: All generated documents must align with the detected technology stack of the platform." />
48
-
49
- <!-- Input Block -->
50
- <input name="platform_id" type="string" required="true" description="Platform identifier (e.g., web-react, backend-nestjs)" />
51
- <input name="platform_type" type="string" required="true" description="Platform type (web, mobile, backend, desktop)" />
52
- <input name="framework" type="string" required="true" description="Primary framework (react, nestjs, flutter, etc.)" />
53
- <input name="source_path" type="string" required="true" description="Platform source directory" />
54
- <input name="config_files" type="array" required="true" description="List of configuration file paths" />
55
- <input name="convention_files" type="array" required="false" description="List of convention file paths" />
56
- <input name="output_path" type="string" required="true" description="Output directory for generated documents" />
57
- <input name="language" type="string" required="true" description="Target language (e.g., zh, en)" />
58
- <input name="completed_dir" type="string" required="false" description="Directory for analysis coverage report output" />
59
-
60
- <!-- Step 0: Read Document Templates -->
61
- <task id="step0-read-templates" action="run-skill" description="Read document templates from templates directory">
62
- <run-skill skill="read-templates" template-path="../speccrew-knowledge-techs-generate/templates/" />
63
- </task>
64
-
65
- <!-- Step 1: Read Configuration Files -->
66
- <task id="step1-read-configs" action="read-files" description="Read primary configuration and convention files">
67
- <read-files files="{config_files}, {convention_files}" />
68
- </task>
69
-
70
- <!-- Step 2: Extract Technology Stack -->
71
- <task id="step2-extract-techstack" action="analyze" description="Parse configuration files to extract technology stack">
72
- <extract>
73
- <item name="core_framework" source="package.json|pom.xml|requirements.txt|pubspec.yaml|go.mod" />
74
- <item name="dependencies" source="dependencies section" />
75
- <item name="build_tools" source="devDependencies, scripts" />
76
- </extract>
77
- </task>
78
-
79
- <!-- Step 3: Analyze Conventions -->
80
- <task id="step3-analyze-conventions" action="analyze" description="Extract conventions from config files and analyze project structure">
81
- <analyze>
82
- <read file="speccrew-workspace/docs/rules/mermaid-rule.md" />
83
- <extract from="ESLint/Prettier configs" />
84
- <analyze-dir path="{source_path}" for="directory-conventions" />
85
- </analyze>
86
- </task>
87
-
88
- <!-- Step 4: UI Style Analysis (Frontend Platforms Only) -->
89
- <gateway id="step4-gateway" mode="exclusive" description="Check if platform is frontend">
90
- <condition test="platform_type in [web, mobile, desktop]">
91
- <task id="step4-ui-analyze" action="run-skill" description="Invoke UI style analysis skill">
92
- <run-skill skill="speccrew-knowledge-techs-ui-analyze" args="source_path={source_path};platform_id={platform_id};platform_type={platform_type};framework={framework};output_path={output_path}/ui-style/;language={language}" />
93
- </task>
94
- </condition>
95
- <fallback>
96
- <event action="log" message="UI style analysis skipped for backend platform" />
97
- </fallback>
98
- </gateway>
99
-
100
- <!-- Step 5: Generate Documents -->
101
- <task id="step5-generate-docs" action="generate" description="Generate all required documents using template fill workflow">
102
- <generate-docs template-path="../speccrew-knowledge-techs-generate/templates/" output-path="{output_path}">
103
- <doc name="INDEX.md" template="INDEX-TEMPLATE.md" />
104
- <doc name="tech-stack.md" template="TECH-STACK-TEMPLATE.md" />
105
- <doc name="architecture.md" template="ARCHITECTURE-TEMPLATE.md" />
106
- <doc name="conventions-design.md" template="CONVENTIONS-DESIGN-TEMPLATE.md" />
107
- <doc name="conventions-dev.md" template="CONVENTIONS-DEV-TEMPLATE.md" />
108
- <doc name="conventions-unit-test.md" template="CONVENTIONS-UNIT-TEST-TEMPLATE.md" />
109
- <doc name="conventions-system-test.md" template="CONVENTIONS-SYSTEM-TEST-TEMPLATE.md" />
110
- <doc name="conventions-build.md" template="CONVENTIONS-BUILD-TEMPLATE.md" />
111
- </generate-docs>
112
- </task>
113
-
114
- <!-- Step 5b: Generate conventions-data.md for Backend -->
115
- <gateway id="step5b-gateway" mode="exclusive" description="Check if data layer document needed">
116
- <condition test="platform_type == backend or data_layer_detected">
117
- <task id="step5b-generate-data" action="generate" description="Generate data layer conventions">
118
- <generate-doc template="CONVENTIONS-DATA-TEMPLATE.md" output="{output_path}/conventions-data.md" />
119
- </task>
120
- </condition>
121
- </gateway>
122
-
123
- <!-- Step 6: Write Output Files -->
124
- <task id="step6-write-output" action="write" description="Write all generated documents to output directory">
125
- <write-files to="{output_path}" />
126
- </task>
127
-
128
- <!-- Step 7: Generate Analysis Coverage Report -->
129
- <task id="step7-coverage-report" action="generate" description="Generate analysis coverage JSON report">
130
- <generate-report output="{completed_dir}/{platform_id}.analysis.json" format="json">
131
- <include name="topics_analysis" />
132
- <include name="config_files_analyzed" />
133
- <include name="source_dirs_scanned" />
134
- <include name="documents_generated" />
135
- </generate-report>
136
- </task>
137
-
138
- <!-- Step 8: Report Results -->
139
- <event id="step8-report" action="log" description="Report generation results">
140
- <report format="structured">
141
- Platform Technology Documents Generated: {platform_id}
142
- - INDEX.md:
143
- - tech-stack.md:
144
- - architecture.md: ✓
145
- - conventions-design.md: ✓
146
- - conventions-dev.md: ✓
147
- - conventions-unit-test.md: ✓
148
- - conventions-system-test.md: ✓
149
- - conventions-build.md:
150
- - conventions-data.md: ✓ (or skipped)
151
- - ui-style-guide.md: (frontend only)
152
- - Output Directory: {output_path}
153
- </report>
154
- </event>
155
-
156
- <!-- Output Block -->
157
- <output name="status" from="generation_status" />
158
- <output name="documents_generated" from="generated_files_list" />
159
- <output name="coverage_report" from="analysis_coverage" />
43
+ <workflow id="techs-generate-main" status="pending" version="1.0" desc="Platform technology documentation generation">
44
+
45
+ <!-- ============================================================
46
+ Global Rules
47
+ ============================================================ -->
48
+ <block type="rule" id="GLOBAL-R1" level="mandatory" desc="Continuous Execution constraint">
49
+ <field name="text">Execute all steps in sequence without interruption. Worker must complete all steps before reporting results.</field>
50
+ </block>
51
+
52
+ <block type="rule" id="GLOBAL-R-TECHSTACK" level="mandatory" desc="Technology Stack constraint">
53
+ <field name="text">All generated documents must align with the detected technology stack of the platform.</field>
54
+ </block>
55
+
56
+ <!-- ============================================================
57
+ Input Parameters Definition
58
+ ============================================================ -->
59
+ <block type="input" id="I1" desc="techs-generate input parameters">
60
+ <field name="platform_id" required="true" type="string" desc="Platform identifier (e.g., web-react, backend-nestjs)"/>
61
+ <field name="platform_type" required="true" type="string" desc="Platform type (web, mobile, backend, desktop)"/>
62
+ <field name="framework" required="true" type="string" desc="Primary framework (react, nestjs, flutter, etc.)"/>
63
+ <field name="source_path" required="true" type="string" desc="Platform source directory"/>
64
+ <field name="config_files" required="true" type="array" desc="List of configuration file paths"/>
65
+ <field name="convention_files" required="false" type="array" desc="List of convention file paths"/>
66
+ <field name="output_path" required="true" type="string" desc="Output directory for generated documents"/>
67
+ <field name="language" required="true" type="string" desc="Target language (e.g., zh, en)"/>
68
+ <field name="completed_dir" required="false" type="string" desc="Directory for analysis coverage report output"/>
69
+ </block>
70
+
71
+ <!-- ============================================================
72
+ Step 0: Read Document Templates
73
+ ============================================================ -->
74
+ <sequence id="S0" name="Template Loading" status="pending" desc="Read document templates from templates directory">
75
+
76
+ <block type="task" id="S0-B1" action="read-file" status="pending" desc="Read document templates from templates directory">
77
+ <field name="file_path">${skill_dir}/../speccrew-knowledge-techs-generate/templates/</field>
78
+ <field name="output" var="document_templates"/>
79
+ </block>
80
+
81
+ </sequence>
82
+
83
+ <!-- ============================================================
84
+ Step 1: Read Configuration Files
85
+ ============================================================ -->
86
+ <sequence id="S1" name="Config Reading" status="pending" desc="Read primary configuration and convention files">
87
+
88
+ <block type="task" id="S1-B1" action="read-files" status="pending" desc="Read primary configuration and convention files">
89
+ <field name="files" value="${config_files},${convention_files}"/>
90
+ <field name="output" var="config_contents"/>
91
+ </block>
92
+
93
+ </sequence>
94
+
95
+ <!-- ============================================================
96
+ Step 2: Extract Technology Stack
97
+ ============================================================ -->
98
+ <sequence id="S2" name="Tech Stack Extraction" status="pending" desc="Parse configuration files to extract technology stack">
99
+
100
+ <block type="task" id="S2-B1" action="analyze" status="pending" desc="Parse configuration files to extract technology stack">
101
+ <field name="extract_items">
102
+ <field name="core_framework" source="package.json|pom.xml|requirements.txt|pubspec.yaml|go.mod"/>
103
+ <field name="dependencies" source="dependencies section"/>
104
+ <field name="build_tools" source="devDependencies, scripts"/>
105
+ </field>
106
+ <field name="output" var="tech_stack"/>
107
+ </block>
108
+
109
+ </sequence>
110
+
111
+ <!-- ============================================================
112
+ Step 3: Analyze Conventions
113
+ ============================================================ -->
114
+ <sequence id="S3" name="Convention Analysis" status="pending" desc="Extract conventions from config files and analyze project structure">
115
+
116
+ <block type="task" id="S3-B1" action="read-file" status="pending" desc="Read mermaid-rule.md for diagram generation">
117
+ <field name="file_path">${workspace_path}/docs/rules/mermaid-rule.md</field>
118
+ <field name="output" var="mermaid_rule"/>
119
+ </block>
120
+
121
+ <block type="task" id="S3-B2" action="analyze" status="pending" desc="Extract conventions from ESLint/Prettier configs and analyze directory structure">
122
+ <field name="extract_from" value="ESLint/Prettier configs"/>
123
+ <field name="analyze_dir" value="${source_path}"/>
124
+ <field name="analyze_for" value="directory-conventions"/>
125
+ <field name="output" var="conventions"/>
126
+ </block>
127
+
128
+ </sequence>
129
+
130
+ <!-- ============================================================
131
+ Step 4: UI Style Analysis (Frontend Platforms Only)
132
+ ============================================================ -->
133
+ <block type="gateway" id="S4-G1" mode="exclusive" desc="Check if platform is frontend">
134
+ <branch test="${platform_type} IN [web, mobile, desktop]" name="Frontend platform">
135
+ <block type="task" id="S4-B1" action="run-skill" status="pending" desc="Invoke UI style analysis skill">
136
+ <field name="skill">speccrew-knowledge-techs-ui-analyze</field>
137
+ <field name="args">source_path=${source_path};platform_id=${platform_id};platform_type=${platform_type};framework=${framework};output_path=${output_path}/ui-style/;language=${language}</field>
138
+ <field name="output" var="ui_style_result"/>
139
+ </block>
140
+ </branch>
141
+ <branch default="true" name="Backend platform">
142
+ <block type="event" id="S4-E1" action="log" level="info" desc="UI style analysis skipped">
143
+ UI style analysis skipped for backend platform
144
+ </block>
145
+ </branch>
146
+ </block>
147
+
148
+ <!-- ============================================================
149
+ Step 5: Generate Documents
150
+ ============================================================ -->
151
+ <sequence id="S5" name="Document Generation" status="pending" desc="Generate all required documents using template fill workflow">
152
+
153
+ <block type="task" id="S5-B1" action="generate" status="pending" desc="Generate all required documents using template fill workflow">
154
+ <field name="template_path">${skill_dir}/../speccrew-knowledge-techs-generate/templates/</field>
155
+ <field name="output_path">${output_path}</field>
156
+ <field name="documents">
157
+ <field name="INDEX.md" template="INDEX-TEMPLATE.md"/>
158
+ <field name="tech-stack.md" template="TECH-STACK-TEMPLATE.md"/>
159
+ <field name="architecture.md" template="ARCHITECTURE-TEMPLATE.md"/>
160
+ <field name="conventions-design.md" template="CONVENTIONS-DESIGN-TEMPLATE.md"/>
161
+ <field name="conventions-dev.md" template="CONVENTIONS-DEV-TEMPLATE.md"/>
162
+ <field name="conventions-unit-test.md" template="CONVENTIONS-UNIT-TEST-TEMPLATE.md"/>
163
+ <field name="conventions-system-test.md" template="CONVENTIONS-SYSTEM-TEST-TEMPLATE.md"/>
164
+ <field name="conventions-build.md" template="CONVENTIONS-BUILD-TEMPLATE.md"/>
165
+ </field>
166
+ <field name="output" var="generated_docs"/>
167
+ </block>
168
+
169
+ </sequence>
170
+
171
+ <!-- ============================================================
172
+ Step 5b: Generate conventions-data.md for Backend
173
+ ============================================================ -->
174
+ <block type="gateway" id="S5b-G1" mode="exclusive" desc="Check if data layer document needed">
175
+ <branch test="${platform_type} == backend OR ${data_layer_detected} == true" name="Data layer required">
176
+ <block type="task" id="S5b-B1" action="generate" status="pending" desc="Generate data layer conventions">
177
+ <field name="template" value="CONVENTIONS-DATA-TEMPLATE.md"/>
178
+ <field name="output_path">${output_path}/conventions-data.md</field>
179
+ <field name="output" var="data_conventions"/>
180
+ </block>
181
+ </branch>
182
+ <branch default="true" name="No data layer">
183
+ <block type="event" id="S5b-E1" action="log" level="info" desc="Data conventions skipped">
184
+ conventions-data.md skipped - not required for this platform
185
+ </block>
186
+ </branch>
187
+ </block>
188
+
189
+ <!-- ============================================================
190
+ Step 6: Write Output Files
191
+ ============================================================ -->
192
+ <block type="task" id="S6-B1" action="write-files" status="pending" desc="Write all generated documents to output directory">
193
+ <field name="output_path">${output_path}</field>
194
+ <field name="files" from="${generated_docs}"/>
195
+ </block>
196
+
197
+ <!-- ============================================================
198
+ Step 7: Generate Analysis Coverage Report
199
+ ============================================================ -->
200
+ <block type="task" id="S7-B1" action="generate" status="pending" desc="Generate analysis coverage JSON report">
201
+ <field name="output_path">${completed_dir}/${platform_id}.analysis.json</field>
202
+ <field name="format" value="json"/>
203
+ <field name="include">
204
+ <field name="topics_analysis"/>
205
+ <field name="config_files_analyzed"/>
206
+ <field name="source_dirs_scanned"/>
207
+ <field name="documents_generated"/>
208
+ </field>
209
+ <field name="output" var="coverage_report"/>
210
+ </block>
211
+
212
+ <!-- ============================================================
213
+ Step 8: Report Results
214
+ ============================================================ -->
215
+ <block type="event" id="S8-E1" action="log" level="info" desc="Report generation results">
216
+ Platform Technology Documents Generated: ${platform_id}
217
+ - INDEX.md: ✓
218
+ - tech-stack.md: ✓
219
+ - architecture.md: ✓
220
+ - conventions-design.md: ✓
221
+ - conventions-dev.md: ✓
222
+ - conventions-unit-test.md: ✓
223
+ - conventions-system-test.md: ✓
224
+ - conventions-build.md: ✓
225
+ - conventions-data.md: ✓ (or skipped)
226
+ - ui-style-guide.md: ✓ (frontend only)
227
+ - Output Directory: ${output_path}
228
+ </block>
229
+
230
+ <!-- ============================================================
231
+ Output Definition
232
+ ============================================================ -->
233
+ <block type="output" id="O1" desc="Workflow output results">
234
+ <field name="status" from="${generation_status}"/>
235
+ <field name="documents_generated" from="${generated_files_list}"/>
236
+ <field name="coverage_report" from="${analysis_coverage}"/>
237
+ </block>
160
238
 
161
239
  </workflow>
162
240
 
@@ -50,105 +50,157 @@ Worker Agent (speccrew-task-worker)
50
50
 
51
51
  > **REQUIRED**: Before executing this workflow, read the XML workflow specification: `docs/rules/xml-workflow-spec.md`
52
52
 
53
- <workflow>
54
-
55
- <!-- Global Rules -->
56
- <rule id="GLOBAL-R1" level="mandatory" description="Continuous Execution: Execute all steps in sequence without interruption. Worker must complete all steps before reporting results." />
57
- <rule id="GLOBAL-R-TECHSTACK" level="mandatory" description="Technology Stack Constraint: All generated index documents must accurately reflect detected platform technology stacks." />
58
-
59
- <!-- Input Block -->
60
- <input name="manifest_path" type="string" required="true" description="Path to techs-manifest.json" />
61
- <input name="techs_base_path" type="string" required="false" default="speccrew-workspace/knowledges/techs/" description="Base path for techs documentation" />
62
- <input name="output_path" type="string" required="false" default="speccrew-workspace/knowledges/techs/" description="Output path for root INDEX.md" />
63
- <input name="language" type="string" required="true" description="Target language (e.g., zh, en)" />
64
-
65
- <!-- Step 0: Read Root Index Template -->
66
- <task id="step0-read-template" action="read" description="Read root index template to understand required structure">
67
- <read-file path="../speccrew-knowledge-techs-index/templates/INDEX-TEMPLATE.md" />
68
- </task>
69
-
70
- <!-- Step 1: Read Manifest -->
71
- <task id="step1-read-manifest" action="read" description="Read techs-manifest.json to get platform list">
72
- <read-file path="{manifest_path}" />
73
- </task>
74
-
75
- <!-- Step 2: Verify Platform Documents -->
76
- <loop id="step2-verify-docs" over="platforms" as="platform" description="Scan each platform directory for document availability">
77
- <task id="step2a-scan-dir" action="list" description="List all .md files in platform directory">
78
- <list-dir path="{techs_base_path}/{platform.platform_id}/" filter="*.md" />
79
- </task>
80
- <task id="step2b-verify-required" action="verify" description="Check required documents exist">
81
- <verify-docs>
82
- <required name="INDEX.md" on-missing="skip-platform" />
83
- <required name="tech-stack.md" on-missing="mark-incomplete" />
84
- <required name="architecture.md" on-missing="mark-incomplete" />
85
- <required name="conventions-design.md" on-missing="mark-incomplete" />
86
- <required name="conventions-dev.md" on-missing="mark-incomplete" />
87
- <required name="conventions-test.md" on-missing="mark-incomplete" />
88
- <required name="conventions-build.md" on-missing="mark-incomplete" />
89
- <optional name="conventions-data.md" />
90
- </verify-docs>
91
- </task>
92
- </loop>
93
-
94
- <!-- Step 3: Extract Platform Summaries -->
95
- <loop id="step3-extract-summaries" over="platforms" as="platform" description="Read each platform INDEX.md for summary extraction">
96
- <gateway mode="guard" condition="platform.documents.INDEX.md exists">
97
- <task action="read" description="Read platform INDEX.md">
98
- <read-file path="{techs_base_path}/{platform.platform_id}/INDEX.md" />
99
- </task>
100
- <task action="extract" description="Extract platform name, framework, language, key technologies">
101
- <extract-fields>
102
- <field name="platform_name" />
103
- <field name="framework" />
104
- <field name="language" />
105
- <field name="key_technologies" />
106
- </extract-fields>
107
- </task>
108
- </gateway>
109
- </loop>
110
-
111
- <!-- Step 4: Get Timestamp -->
112
- <task id="step4-get-timestamp" action="run-script" description="Get current timestamp for generated_at field">
113
- <run-script script="scripts/get-timestamp.js" output="timestamp" />
114
- </task>
115
-
116
- <!-- Step 5: Generate Root INDEX.md -->
117
- <task id="step5-generate-index" action="generate" description="Generate root INDEX.md using template fill workflow">
118
- <generate-index template-path="../speccrew-knowledge-techs-index/templates/INDEX-TEMPLATE.md" output-path="{output_path}/INDEX.md">
119
- <copy-template />
120
- <fill-sections>
121
- <section name="header" with="{generated_at}, {source_path}, {platform_count}" />
122
- <section name="platform-overview" with="dynamic_links_from_verification" />
123
- <section name="quick-reference" with="organized_links" />
124
- <section name="agent-mapping" with="platform_agent_documents" />
125
- <section name="document-guide" with="document_descriptions" />
126
- <section name="usage-guide" with="agent_usage_instructions" />
127
- </fill-sections>
128
- </generate-index>
129
- </task>
130
-
131
- <!-- Step 6: Write Output -->
132
- <task id="step6-write-output" action="write" description="Write generated INDEX.md to output path">
133
- <write-file path="{output_path}/INDEX.md" />
134
- </task>
135
-
136
- <!-- Step 7: Report Results -->
137
- <event id="step7-report" action="log" description="Report generation results">
138
- <report format="structured">
139
- Stage 3 completed: Root Technology Index Generated
140
- - Platforms Indexed: {platform_count}
141
- - web-react: ✓
142
- - backend-nestjs: ✓
143
- - Root Index: {output_path}/INDEX.md
144
- - Agent Mappings: Documented for all platforms
145
- </report>
146
- </event>
147
-
148
- <!-- Output Block -->
149
- <output name="status" from="generation_status" />
150
- <output name="platforms_indexed" from="indexed_platforms_list" />
151
- <output name="output_file" from="index_file_path" />
53
+ <workflow id="techs-index-main" status="pending" version="1.0" desc="Root technology index generation from platform manifests">
54
+
55
+ <!-- ============================================================
56
+ Global Rules
57
+ ============================================================ -->
58
+ <block type="rule" id="GLOBAL-R1" level="mandatory" desc="Continuous Execution constraint">
59
+ <field name="text">Execute all steps in sequence without interruption. Worker must complete all steps before reporting results.</field>
60
+ </block>
61
+
62
+ <block type="rule" id="GLOBAL-R-TECHSTACK" level="mandatory" desc="Technology Stack constraint">
63
+ <field name="text">All generated index documents must accurately reflect detected platform technology stacks.</field>
64
+ </block>
65
+
66
+ <!-- ============================================================
67
+ Input Parameters Definition
68
+ ============================================================ -->
69
+ <block type="input" id="I1" desc="techs-index input parameters">
70
+ <field name="manifest_path" required="true" type="string" desc="Path to techs-manifest.json"/>
71
+ <field name="techs_base_path" required="false" type="string" default="speccrew-workspace/knowledges/techs/" desc="Base path for techs documentation"/>
72
+ <field name="output_path" required="false" type="string" default="speccrew-workspace/knowledges/techs/" desc="Output path for root INDEX.md"/>
73
+ <field name="language" required="true" type="string" desc="Target language (e.g., zh, en)"/>
74
+ </block>
75
+
76
+ <!-- ============================================================
77
+ Step 0: Read Root Index Template
78
+ ============================================================ -->
79
+ <sequence id="S0" name="Template Loading" status="pending" desc="Read root index template to understand required structure">
80
+
81
+ <block type="task" id="S0-B1" action="read-file" status="pending" desc="Read root index template">
82
+ <field name="file_path">${skill_dir}/../speccrew-knowledge-techs-index/templates/INDEX-TEMPLATE.md</field>
83
+ <field name="output" var="index_template"/>
84
+ </block>
85
+
86
+ </sequence>
87
+
88
+ <!-- ============================================================
89
+ Step 1: Read Manifest
90
+ ============================================================ -->
91
+ <sequence id="S1" name="Manifest Reading" status="pending" desc="Read techs-manifest.json to get platform list">
92
+
93
+ <block type="task" id="S1-B1" action="read-file" status="pending" desc="Read techs-manifest.json">
94
+ <field name="file_path">${manifest_path}</field>
95
+ <field name="output" var="techs_manifest"/>
96
+ </block>
97
+
98
+ </sequence>
99
+
100
+ <!-- ============================================================
101
+ Step 2: Verify Platform Documents
102
+ ============================================================ -->
103
+ <sequence id="S2" name="Document Verification" status="pending" desc="Scan each platform directory for document availability">
104
+
105
+ <block type="loop" id="S2-L1" over="${techs_manifest.platforms}" as="platform" desc="Scan each platform directory for document availability">
106
+ <!-- Step 2a: List .md files in platform directory -->
107
+ <block type="task" id="S2-B1" action="list-dir" status="pending" desc="List all .md files in platform directory">
108
+ <field name="path">${techs_base_path}/${platform.platform_id}/</field>
109
+ <field name="filter" value="*.md"/>
110
+ <field name="output" var="platform_md_files"/>
111
+ </block>
112
+
113
+ <!-- Step 2b: Verify required documents -->
114
+ <block type="task" id="S2-B2" action="verify" status="pending" desc="Check required documents exist">
115
+ <field name="required_docs" value="INDEX.md,tech-stack.md,architecture.md,conventions-design.md,conventions-dev.md,conventions-unit-test.md,conventions-system-test.md,conventions-build.md"/>
116
+ <field name="optional_docs" value="conventions-data.md"/>
117
+ <field name="on_missing_required" value="mark-incomplete"/>
118
+ <field name="output" var="platform_doc_status"/>
119
+ </block>
120
+ </block>
121
+
122
+ </sequence>
123
+
124
+ <!-- ============================================================
125
+ Step 3: Extract Platform Summaries
126
+ ============================================================ -->
127
+ <sequence id="S3" name="Summary Extraction" status="pending" desc="Read each platform INDEX.md for summary extraction">
128
+
129
+ <block type="loop" id="S3-L1" over="${techs_manifest.platforms}" as="platform" desc="Read each platform INDEX.md for summary extraction">
130
+ <block type="gateway" id="S3-G1" mode="guard" test="${platform.documents.INDEX.md} exists" fail-action="skip" desc="Only process platforms with INDEX.md">
131
+ <field name="message">Skipping platform without INDEX.md: ${platform.platform_id}</field>
132
+
133
+ <block type="task" id="S3-B1" action="read-file" status="pending" desc="Read platform INDEX.md">
134
+ <field name="file_path">${techs_base_path}/${platform.platform_id}/INDEX.md</field>
135
+ <field name="output" var="platform_index_content"/>
136
+ </block>
137
+
138
+ <block type="task" id="S3-B2" action="analyze" status="pending" desc="Extract platform name, framework, language, key technologies">
139
+ <field name="extract_fields" value="platform_name,framework,language,key_technologies"/>
140
+ <field name="output" var="platform_summary"/>
141
+ </block>
142
+ </block>
143
+ </block>
144
+
145
+ </sequence>
146
+
147
+ <!-- ============================================================
148
+ Step 4: Get Timestamp
149
+ ============================================================ -->
150
+ <block type="task" id="S4-B1" action="run-script" status="pending" desc="Get current timestamp for generated_at field">
151
+ <field name="command">node scripts/get-timestamp.js</field>
152
+ <field name="output" var="timestamp"/>
153
+ </block>
154
+
155
+ <!-- ============================================================
156
+ Step 5: Generate Root INDEX.md
157
+ ============================================================ -->
158
+ <sequence id="S5" name="Index Generation" status="pending" desc="Generate root INDEX.md using template fill workflow">
159
+
160
+ <block type="task" id="S5-B1" action="generate" status="pending" desc="Generate root INDEX.md from template">
161
+ <field name="template_path">${skill_dir}/../speccrew-knowledge-techs-index/templates/INDEX-TEMPLATE.md</field>
162
+ <field name="output_path">${output_path}/INDEX.md</field>
163
+ <field name="sections">
164
+ <field name="header" value="${generated_at},${source_path},${platform_count}"/>
165
+ <field name="platform-overview" value="dynamic_links_from_verification"/>
166
+ <field name="quick-reference" value="organized_links"/>
167
+ <field name="agent-mapping" value="platform_agent_documents"/>
168
+ <field name="document-guide" value="document_descriptions"/>
169
+ <field name="usage-guide" value="agent_usage_instructions"/>
170
+ </field>
171
+ <field name="output" var="generated_index"/>
172
+ </block>
173
+
174
+ </sequence>
175
+
176
+ <!-- ============================================================
177
+ Step 6: Write Output
178
+ ============================================================ -->
179
+ <block type="task" id="S6-B1" action="write-file" status="pending" desc="Write generated INDEX.md to output path">
180
+ <field name="file_path">${output_path}/INDEX.md</field>
181
+ <field name="content" from="${generated_index}"/>
182
+ </block>
183
+
184
+ <!-- ============================================================
185
+ Step 7: Report Results
186
+ ============================================================ -->
187
+ <block type="event" id="S7-E1" action="log" level="info" desc="Report generation results">
188
+ Stage 3 completed: Root Technology Index Generated
189
+ - Platforms Indexed: ${platform_count}
190
+ - web-react: ✓
191
+ - backend-nestjs: ✓
192
+ - Root Index: ${output_path}/INDEX.md
193
+ - Agent Mappings: Documented for all platforms
194
+ </block>
195
+
196
+ <!-- ============================================================
197
+ Output Definition
198
+ ============================================================ -->
199
+ <block type="output" id="O1" desc="Workflow output results">
200
+ <field name="status" from="${generation_status}"/>
201
+ <field name="platforms_indexed" from="${indexed_platforms_list}"/>
202
+ <field name="output_file" from="${index_file_path}"/>
203
+ </block>
152
204
 
153
205
  </workflow>
154
206