speccrew 0.1.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 (153) hide show
  1. package/.speccrew/agents/speccrew-feature-designer.md +142 -0
  2. package/.speccrew/agents/speccrew-product-manager.md +61 -0
  3. package/.speccrew/agents/speccrew-system-designer.md +200 -0
  4. package/.speccrew/agents/speccrew-system-developer.md +238 -0
  5. package/.speccrew/agents/speccrew-task-worker.md +80 -0
  6. package/.speccrew/agents/speccrew-team-leader.md +92 -0
  7. package/.speccrew/agents/speccrew-test-manager.md +313 -0
  8. package/.speccrew/skills/speccrew-create-agents/SKILL.md +98 -0
  9. package/.speccrew/skills/speccrew-create-agents/templates/agents/designer-agent.md +54 -0
  10. package/.speccrew/skills/speccrew-create-agents/templates/agents/dev-agent.md +79 -0
  11. package/.speccrew/skills/speccrew-create-agents/templates/agents/test-agent.md +80 -0
  12. package/.speccrew/skills/speccrew-dev-backend/SKILL.md +205 -0
  13. package/.speccrew/skills/speccrew-dev-backend/templates/TASK-RECORD-TEMPLATE.md +118 -0
  14. package/.speccrew/skills/speccrew-dev-desktop/SKILL.md +258 -0
  15. package/.speccrew/skills/speccrew-dev-desktop/templates/TASK-RECORD-TEMPLATE.md +161 -0
  16. package/.speccrew/skills/speccrew-dev-frontend/SKILL.md +202 -0
  17. package/.speccrew/skills/speccrew-dev-frontend/templates/TASK-RECORD-TEMPLATE.md +115 -0
  18. package/.speccrew/skills/speccrew-dev-mobile/SKILL.md +200 -0
  19. package/.speccrew/skills/speccrew-dev-mobile/templates/TASK-RECORD-TEMPLATE.md +125 -0
  20. package/.speccrew/skills/speccrew-fd-api-contract/SKILL.md +73 -0
  21. package/.speccrew/skills/speccrew-fd-api-contract/templates/API-CONTRACT-TEMPLATE.md +96 -0
  22. package/.speccrew/skills/speccrew-fd-feature-design/SKILL.md +395 -0
  23. package/.speccrew/skills/speccrew-fd-feature-design/templates/FEATURE-SPEC-TEMPLATE.md +387 -0
  24. package/.speccrew/skills/speccrew-get-timestamp/SKILL.md +80 -0
  25. package/.speccrew/skills/speccrew-get-timestamp/scripts/get-timestamp.js +35 -0
  26. package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/SKILL.md +1116 -0
  27. package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/templates/FEATURE-DETAIL-TEMPLATE-FASTAPI.md +462 -0
  28. package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/templates/FEATURE-DETAIL-TEMPLATE-JAVA.md +480 -0
  29. package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/templates/FEATURE-DETAIL-TEMPLATE-NET.md +464 -0
  30. package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/templates/FEATURE-DETAIL-TEMPLATE.md +480 -0
  31. package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/templates/MODULE-OVERVIEW-TEMPLATE.md +367 -0
  32. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/SKILL.md +667 -0
  33. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/STATUS-FORMATS.md +74 -0
  34. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/batch-orchestrator.js +176 -0
  35. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/get-next-batch.js +150 -0
  36. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/get-pending-features.js +106 -0
  37. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/mark-stale.js +249 -0
  38. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/process-batch-results.js +848 -0
  39. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/update-feature-status.js +226 -0
  40. package/.speccrew/skills/speccrew-knowledge-bizs-init-features/SKILL.md +264 -0
  41. package/.speccrew/skills/speccrew-knowledge-bizs-init-features/examples/features.json +34 -0
  42. package/.speccrew/skills/speccrew-knowledge-bizs-init-features/scripts/generate-inventory.js +867 -0
  43. package/.speccrew/skills/speccrew-knowledge-bizs-init-features/scripts/test-inventory.js +26 -0
  44. package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/SKILL.md +165 -0
  45. package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/scripts/apply-module-mapping.js +208 -0
  46. package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/scripts/extract-module-summary.js +180 -0
  47. package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/scripts/reindex-modules.js +358 -0
  48. package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/SKILL.md +1055 -0
  49. package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/templates/FEATURE-DETAIL-TEMPLATE-UI-DESKTOP.md +303 -0
  50. package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/templates/FEATURE-DETAIL-TEMPLATE-UI-ELECTRON.md +327 -0
  51. package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/templates/FEATURE-DETAIL-TEMPLATE-UI-MINIAPP.md +292 -0
  52. package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/templates/FEATURE-DETAIL-TEMPLATE-UI-MOBILE.md +281 -0
  53. package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/templates/FEATURE-DETAIL-TEMPLATE-UI.md +324 -0
  54. package/.speccrew/skills/speccrew-knowledge-bizs-ui-style-extract/SKILL.md +270 -0
  55. package/.speccrew/skills/speccrew-knowledge-bizs-ui-style-extract/templates/COMPONENT-PATTERN-TEMPLATE.md +33 -0
  56. package/.speccrew/skills/speccrew-knowledge-bizs-ui-style-extract/templates/LAYOUT-PATTERN-TEMPLATE.md +33 -0
  57. package/.speccrew/skills/speccrew-knowledge-bizs-ui-style-extract/templates/PAGE-TYPE-TEMPLATE.md +33 -0
  58. package/.speccrew/skills/speccrew-knowledge-graph-query/SKILL.md +229 -0
  59. package/.speccrew/skills/speccrew-knowledge-graph-query/scripts/graph-query.js +549 -0
  60. package/.speccrew/skills/speccrew-knowledge-graph-write/SKILL.md +181 -0
  61. package/.speccrew/skills/speccrew-knowledge-graph-write/scripts/graph-write.js +651 -0
  62. package/.speccrew/skills/speccrew-knowledge-module-summarize/SKILL.md +305 -0
  63. package/.speccrew/skills/speccrew-knowledge-module-summarize/templates/MODULE-OVERVIEW-TEMPLATE.md +400 -0
  64. package/.speccrew/skills/speccrew-knowledge-system-summarize/SKILL.md +351 -0
  65. package/.speccrew/skills/speccrew-knowledge-system-summarize/templates/SYSTEM-OVERVIEW-TEMPLATE.md +294 -0
  66. package/.speccrew/skills/speccrew-knowledge-techs-dispatch/SKILL.md +683 -0
  67. package/.speccrew/skills/speccrew-knowledge-techs-dispatch/STATUS-FORMATS.md +550 -0
  68. package/.speccrew/skills/speccrew-knowledge-techs-dispatch/templates/techs-manifest-EXAMPLE.json +35 -0
  69. package/.speccrew/skills/speccrew-knowledge-techs-generate/SKILL.md +1087 -0
  70. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/ARCHITECTURE-TEMPLATE.md +240 -0
  71. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/COLOR-SYSTEM-TEMPLATE.md +68 -0
  72. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/COMPONENT-LIBRARY-TEMPLATE.md +86 -0
  73. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/CONVENTIONS-BUILD-TEMPLATE.md +466 -0
  74. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/CONVENTIONS-DATA-TEMPLATE.md +432 -0
  75. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/CONVENTIONS-DESIGN-TEMPLATE.md +1209 -0
  76. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/CONVENTIONS-DEV-TEMPLATE.md +1433 -0
  77. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/CONVENTIONS-SYSTEM-TEST-TEMPLATE.md +1052 -0
  78. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/CONVENTIONS-UNIT-TEST-TEMPLATE.md +946 -0
  79. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/INDEX-TEMPLATE.md +29 -0
  80. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/PAGE-LAYOUTS-TEMPLATE.md +69 -0
  81. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/PAGE-TYPE-SUMMARY-TEMPLATE.md +74 -0
  82. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/TECH-STACK-TEMPLATE.md +232 -0
  83. package/.speccrew/skills/speccrew-knowledge-techs-generate-conventions/SKILL.md +628 -0
  84. package/.speccrew/skills/speccrew-knowledge-techs-generate-ui-style/SKILL.md +392 -0
  85. package/.speccrew/skills/speccrew-knowledge-techs-index/SKILL.md +489 -0
  86. package/.speccrew/skills/speccrew-knowledge-techs-index/templates/INDEX-TEMPLATE.md +243 -0
  87. package/.speccrew/skills/speccrew-knowledge-techs-init/SKILL.md +269 -0
  88. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/SKILL.md +562 -0
  89. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/BUSINESS-COMPONENTS-TEMPLATE.md +171 -0
  90. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/COMMON-COMPONENTS-TEMPLATE.md +177 -0
  91. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/COMPONENT-INDIVIDUAL-TEMPLATE.md +80 -0
  92. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/COMPONENT-LIBRARY-TEMPLATE.md +118 -0
  93. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/LAYOUT-INDIVIDUAL-TEMPLATE.md +97 -0
  94. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/LAYOUT-PATTERNS-TEMPLATE.md +208 -0
  95. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/NAVIGATION-PATTERNS-TEMPLATE.md +157 -0
  96. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/PAGE-TYPE-INDIVIDUAL-TEMPLATE.md +123 -0
  97. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/PAGE-TYPE-SUMMARY-TEMPLATE.md +58 -0
  98. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/SPACING-TEMPLATE.md +119 -0
  99. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/STYLE-SYSTEM-TEMPLATE.md +117 -0
  100. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/TYPOGRAPHY-TEMPLATE.md +107 -0
  101. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/UI-STYLE-GUIDE-TEMPLATE.md +171 -0
  102. package/.speccrew/skills/speccrew-pm-requirement-analysis/SKILL.md +434 -0
  103. package/.speccrew/skills/speccrew-pm-requirement-analysis/templates/BIZS-MODELING-TEMPLATE.md +332 -0
  104. package/.speccrew/skills/speccrew-pm-requirement-analysis/templates/PRD-TEMPLATE.md +200 -0
  105. package/.speccrew/skills/speccrew-pm-requirement-assess/SKILL.md +195 -0
  106. package/.speccrew/skills/speccrew-project-diagnosis/SKILL.md +208 -0
  107. package/.speccrew/skills/speccrew-project-diagnosis/templates/DIAGNOSIS-REPORT-TEMPLATE.md +202 -0
  108. package/.speccrew/skills/speccrew-sd-backend/SKILL.md +188 -0
  109. package/.speccrew/skills/speccrew-sd-backend/templates/INDEX-TEMPLATE.md +85 -0
  110. package/.speccrew/skills/speccrew-sd-backend/templates/SD-BACKEND-TEMPLATE.md +269 -0
  111. package/.speccrew/skills/speccrew-sd-desktop/SKILL.md +192 -0
  112. package/.speccrew/skills/speccrew-sd-desktop/templates/INDEX-TEMPLATE.md +271 -0
  113. package/.speccrew/skills/speccrew-sd-desktop/templates/SD-DESKTOP-TEMPLATE.md +673 -0
  114. package/.speccrew/skills/speccrew-sd-frontend/SKILL.md +176 -0
  115. package/.speccrew/skills/speccrew-sd-frontend/templates/INDEX-TEMPLATE.md +184 -0
  116. package/.speccrew/skills/speccrew-sd-frontend/templates/SD-FRONTEND-TEMPLATE.md +382 -0
  117. package/.speccrew/skills/speccrew-sd-mobile/SKILL.md +189 -0
  118. package/.speccrew/skills/speccrew-sd-mobile/templates/INDEX-TEMPLATE.md +219 -0
  119. package/.speccrew/skills/speccrew-sd-mobile/templates/SD-MOBILE-TEMPLATE.md +534 -0
  120. package/.speccrew/skills/speccrew-test-case-design/SKILL.md +284 -0
  121. package/.speccrew/skills/speccrew-test-case-design/templates/TEST-CASE-DESIGN-TEMPLATE.md +263 -0
  122. package/.speccrew/skills/speccrew-test-code-gen/SKILL.md +313 -0
  123. package/.speccrew/skills/speccrew-test-code-gen/templates/TEST-CODE-PLAN-TEMPLATE.md +180 -0
  124. package/.speccrew/skills/speccrew-test-execute/SKILL.md +283 -0
  125. package/.speccrew/skills/speccrew-test-execute/templates/BUG-REPORT-TEMPLATE.md +50 -0
  126. package/.speccrew/skills/speccrew-test-execute/templates/TEST-REPORT-TEMPLATE.md +57 -0
  127. package/.speccrew/skills/speccrew-workflow-diagnose/SKILL.md +155 -0
  128. package/LICENSE +21 -0
  129. package/README.ar.md +318 -0
  130. package/README.en.md +318 -0
  131. package/README.es.md +318 -0
  132. package/README.md +340 -0
  133. package/bin/cli.js +62 -0
  134. package/lib/commands/doctor.js +138 -0
  135. package/lib/commands/init.js +231 -0
  136. package/lib/commands/list.js +114 -0
  137. package/lib/commands/uninstall.js +117 -0
  138. package/lib/commands/update.js +351 -0
  139. package/lib/ide-adapters.js +73 -0
  140. package/lib/utils.js +104 -0
  141. package/package.json +28 -0
  142. package/workspace-template/docs/configs/document-templates.json +667 -0
  143. package/workspace-template/docs/configs/platform-mapping.json +194 -0
  144. package/workspace-template/docs/configs/tech-stack-mappings.json +313 -0
  145. package/workspace-template/docs/configs/validation-rules.json +87 -0
  146. package/workspace-template/docs/rules/mermaid-rule.md +114 -0
  147. package/workspace-template/docs/solutions/Agent/346/212/200/350/203/275/345/256/232/344/271/211+/351/234/200/346/261/202/346/226/207/346/241/243+UML/344/275/277/347/224/250/346/250/241/346/235/277/357/274/210ISA-95/345/205/255/346/256/265/345/274/217/350/236/215/345/220/210/347/211/210/357/274/211.md +586 -0
  148. package/workspace-template/docs/solutions/agent-knowledge-map.md +238 -0
  149. package/workspace-template/docs/solutions/bizs-knowledge-pipeline.md +678 -0
  150. package/workspace-template/docs/solutions/harness.md +410 -0
  151. package/workspace-template/docs/solutions/knowledge-incremental-sync-spec.md +943 -0
  152. package/workspace-template/docs/solutions/techs-knowledge-pipeline.md +803 -0
  153. package/workspace-template/docs/solutions/workspace-structure.md +318 -0
@@ -0,0 +1,489 @@
1
+ ---
2
+ name: speccrew-knowledge-techs-index
3
+ description: Stage 3 of technology knowledge initialization - Generate root INDEX.md by aggregating all platform technology documents. Creates the master index that maps platforms to their documentation and provides Agent-to-Platform mapping guide. Used by Worker Agent after all platform documents are generated.
4
+ tools: Read, Write, Skill
5
+ ---
6
+
7
+ # Stage 3: Generate Root Technology Index
8
+
9
+ Aggregate all platform technology documentation into a single root INDEX.md that serves as the master navigation hub for technology knowledge.
10
+
11
+ ## Language Adaptation
12
+
13
+ **CRITICAL**: Generate all content in the language specified by the `language` parameter.
14
+
15
+ - `language: "zh"` → Generate all content in 中文
16
+ - `language: "en"` → Generate all content in English
17
+ - Other languages → Use the specified language
18
+
19
+ ## Trigger Scenarios
20
+
21
+ - "Generate techs root index"
22
+ - "Create technology knowledge index"
23
+ - "Aggregate platform tech docs"
24
+ - "Generate master tech index"
25
+
26
+ ## User
27
+
28
+ Worker Agent (speccrew-task-worker)
29
+
30
+ ## Input
31
+
32
+ - `manifest_path`: Path to techs-manifest.json
33
+ - `techs_base_path`: Base path for techs documentation (default: `speccrew-workspace/knowledges/techs/`)
34
+ - `output_path`: Output path for root INDEX.md (default: `speccrew-workspace/knowledges/techs/`)
35
+ - `language`: Target language (e.g., "zh", "en") - **REQUIRED**
36
+
37
+ ## Output
38
+
39
+ - `{{output_path}}/INDEX.md` - Root technology knowledge index
40
+
41
+ ## Workflow
42
+
43
+ ```mermaid
44
+ flowchart TD
45
+ Start([Start]) --> Step0[Step 0: Read Root Index Template]
46
+ Step0 --> Step1[Step 1: Read Manifest]
47
+ Step1 --> Step2[Step 2: Verify Platform Documents]
48
+ Step2 --> Step3[Step 3: Extract Platform Summaries]
49
+ Step3 --> Step4[Step 4: Generate Root INDEX.md]
50
+ Step4 --> Step5[Step 5: Write Output]
51
+ Step5 --> Step6[Step 6: Report Results]
52
+ Step6 --> End([End])
53
+ ```
54
+
55
+ ### Step 0: Read Root Index Template
56
+
57
+ Before processing, read the template file to understand the required content structure:
58
+ - **Read**: `templates/INDEX-TEMPLATE.md`
59
+ - **Purpose**: Understand the template chapters and example content requirements for root technology index documents
60
+ - **Key sections to follow**:
61
+ - Introduction (generation info, platform count)
62
+ - Project Structure (Platform Overview table, Directory Structure)
63
+ - Core Components (Technology Stacks, Architecture Guidelines, Design Conventions, Development Conventions, Testing Conventions)
64
+ - Architecture Overview (Platform Architecture Map with Mermaid diagram)
65
+ - Detailed Component Analysis (Agent-to-Platform Mapping)
66
+ - Dependency Analysis (Cross-Platform Dependencies with Mermaid diagram)
67
+ - Performance Considerations
68
+ - Troubleshooting Guide
69
+ - Conclusion
70
+ - Appendix (Document Guide, Usage Guide)
71
+
72
+ ### Step 1: Read Manifest
73
+
74
+ Read `techs-manifest.json` to get the list of all platforms:
75
+
76
+ ```json
77
+ {
78
+ "generated_at": "2024-01-15T10:30:00Z",
79
+ "source_path": "/project",
80
+ "language": "zh",
81
+ "platforms": [
82
+ {
83
+ "platform_id": "web-react",
84
+ "platform_type": "web",
85
+ "framework": "react",
86
+ "language": "typescript"
87
+ },
88
+ {
89
+ "platform_id": "backend-nestjs",
90
+ "platform_type": "backend",
91
+ "framework": "nestjs",
92
+ "language": "typescript"
93
+ }
94
+ ]
95
+ }
96
+ ```
97
+
98
+ ### Step 2: Verify Platform Documents (Dynamic Detection)
99
+
100
+ **CRITICAL**: Do NOT assume all platforms have the same document set. Must dynamically detect which documents actually exist.
101
+
102
+ For each platform in manifest, scan the platform directory to detect actual document existence:
103
+
104
+ ```
105
+ speccrew-workspace/knowledges/techs/{{platform_id}}/
106
+ ├── INDEX.md # Required - must exist
107
+ ├── tech-stack.md # Required - must exist
108
+ ├── architecture.md # Required - must exist
109
+ ├── conventions-design.md # Required - must exist
110
+ ├── conventions-dev.md # Required - must exist
111
+ ├── conventions-test.md # Required - must exist
112
+ ├── conventions-build.md # Required - must exist
113
+ └── conventions-data.md # Optional - check existence dynamically
114
+ ```
115
+
116
+ **Dynamic Detection Logic:**
117
+
118
+ 1. **Scan Platform Directory**: List all `.md` files in `{{techs_base_path}}/{{platform_id}}/`
119
+ 2. **Build Document Availability Map**:
120
+ ```json
121
+ {
122
+ "platform_id": "mobile-uniapp",
123
+ "documents": {
124
+ "INDEX.md": true,
125
+ "tech-stack.md": true,
126
+ "architecture.md": true,
127
+ "conventions-design.md": true,
128
+ "conventions-dev.md": true,
129
+ "conventions-test.md": true,
130
+ "conventions-build.md": true,
131
+ "conventions-data.md": false // Dynamically detected (optional)
132
+ }
133
+ }
134
+ ```
135
+ 3. **Validation**:
136
+ - If `INDEX.md` is missing → Note as error in report, skip this platform
137
+ - If any required document (except conventions-data.md) is missing → Note as warning
138
+ - Record actual document availability for dynamic link generation
139
+
140
+ #### Document Verification Matrix
141
+
142
+ For each platform directory, verify document existence with these strict rules:
143
+
144
+ | Document | Required? | If Missing | Action |
145
+ |----------|-----------|------------|--------|
146
+ | INDEX.md | YES | ERROR | Skip entire platform from root INDEX. Log: "ERROR: Platform {platform_id} skipped - INDEX.md missing" |
147
+ | tech-stack.md | YES | WARN | Include platform but mark document as "[Missing]" in links. Log warning |
148
+ | architecture.md | YES | WARN | Include platform but mark as "[Missing]". Log warning |
149
+ | conventions-design.md | YES | WARN | Include platform but mark as "[Missing]". Log warning |
150
+ | conventions-dev.md | YES | WARN | Include platform but mark as "[Missing]". Log warning |
151
+ | conventions-test.md | YES | WARN | Include platform but mark as "[Missing]". Log warning |
152
+ | conventions-build.md | YES | WARN | Include platform but mark as "[Missing]". Log warning |
153
+ | conventions-data.md | NO | OK | Do not warn. Do not include link. Silently skip |
154
+
155
+ **Platform Eligibility Rules**:
156
+ - INDEX.md missing → Platform SKIPPED entirely (not listed in root INDEX)
157
+ - Any required doc missing (except INDEX.md) → Platform INCLUDED but marked INCOMPLETE
158
+ - Only conventions-data.md missing → Platform is COMPLETE (it's optional)
159
+
160
+ **Verification Summary** (generate at end of verification step):
161
+ ```
162
+ Verification Report:
163
+ - Total platforms in manifest: {N}
164
+ - Complete platforms: {X} (all 7 required docs present)
165
+ - Incomplete platforms: {Y} (missing some required docs) [WARN]
166
+ - {platform_id}: missing {doc1}, {doc2}
167
+ - Skipped platforms: {Z} (no INDEX.md) [ERROR]
168
+ - {platform_id}: INDEX.md not found
169
+ - Optional conventions-data.md present in: {W} platforms
170
+ ```
171
+
172
+ ### Step 3: Extract Platform Summaries
173
+
174
+ Read each platform's INDEX.md to extract:
175
+ - Platform name/type
176
+ - Framework and version
177
+ - Primary language
178
+ - Key technologies (brief)
179
+
180
+ ### Step 4: Generate Root INDEX.md (MANDATORY: Copy Template + Fill)
181
+
182
+ **CRITICAL**: This step MUST follow the template fill workflow - copy template first, then fill sections.
183
+
184
+ 1. **Copy Template File**:
185
+ - Copy `templates/INDEX-TEMPLATE.md` to `{output_path}/INDEX.md`
186
+ - This preserves the template structure and all required sections
187
+
188
+ 2. **Fill Template Sections with search_replace**:
189
+ - Use `search_replace` tool to fill each section of the template
190
+ - Replace placeholder content with actual data from platform analysis
191
+
192
+ **MANDATORY RULES**:
193
+ - **Do NOT use create_file to rewrite the entire document**
194
+ - **Do NOT delete or skip any template section**
195
+ - Only replace the placeholder content within each section
196
+ - Preserve all template section headers and structure
197
+
198
+ 3. **Get Timestamp**:
199
+ - **CRITICAL**: Use the Skill tool to invoke `speccrew-get-timestamp` (no format parameter needed, uses default)
200
+ - Store the returned timestamp as `{{generated_at}}` template variable
201
+
202
+ 4. **Fill the following sections** in the copied template:
203
+
204
+ #### Section 1: Header
205
+
206
+ ```markdown
207
+ # Technology Knowledge Index
208
+
209
+ <cite>
210
+ **Files Referenced in This Document**
211
+ - [techs-manifest.json](../../../speccrew-workspace/knowledges/techs/techs-manifest.json)
212
+ </cite>
213
+
214
+ > **Target Audience**: devcrew-designer-*, devcrew-dev-*, devcrew-test-*
215
+
216
+ ## Table of Contents
217
+
218
+ 1. [Introduction](#introduction)
219
+ 2. [Project Structure](#project-structure)
220
+ 3. [Core Components](#core-components)
221
+ 4. [Architecture Overview](#architecture-overview)
222
+ 5. [Detailed Component Analysis](#detailed-component-analysis)
223
+ 6. [Dependency Analysis](#dependency-analysis)
224
+ 7. [Performance Considerations](#performance-considerations)
225
+ 8. [Troubleshooting Guide](#troubleshooting-guide)
226
+ 9. [Conclusion](#conclusion)
227
+ 10. [Appendix](#appendix)
228
+
229
+ ## Introduction
230
+
231
+ This technology knowledge index serves all platforms in the project, providing platform overview, document navigation, and Agent usage guidelines.
232
+
233
+ > Generated at: {{generated_at}}
234
+ > Source: {{source_path}}
235
+ > Platforms: {{platform_count}}
236
+ ```
237
+
238
+ #### Section 2: Platform Overview
239
+
240
+ Summary table of all platforms with **dynamically generated document links**:
241
+
242
+ ```markdown
243
+ ## Platform Overview
244
+
245
+ | Platform | Type | Framework | Stack | Arch | Design | Dev | Test | Build | Data |
246
+ |----------|------|-----------|-------|------|--------|-----|------|-------|------|
247
+ | [web-react](web-react/INDEX.md) | web | React | [Stack](web-react/tech-stack.md) | [Arch](web-react/architecture.md) | [Design](web-react/conventions-design.md) | [Dev](web-react/conventions-dev.md) | [Test](web-react/conventions-test.md) | [Build](web-react/conventions-build.md) | - |
248
+ | [backend-nestjs](backend-nestjs/INDEX.md) | backend | NestJS | [Stack](backend-nestjs/tech-stack.md) | [Arch](backend-nestjs/architecture.md) | [Design](backend-nestjs/conventions-design.md) | [Dev](backend-nestjs/conventions-dev.md) | [Test](backend-nestjs/conventions-test.md) | [Build](backend-nestjs/conventions-build.md) | [Data](backend-nestjs/conventions-data.md) |
249
+ | [mobile-uniapp](mobile-uniapp/INDEX.md) | mobile | UniApp | [Stack](mobile-uniapp/tech-stack.md) | [Arch](mobile-uniapp/architecture.md) | [Design](mobile-uniapp/conventions-design.md) | [Dev](mobile-uniapp/conventions-dev.md) | [Test](mobile-uniapp/conventions-test.md) | [Build](mobile-uniapp/conventions-build.md) | - |
250
+ ```
251
+
252
+ **Dynamic Link Generation Rules:**
253
+
254
+ 1. **Always include links to required documents** (if they exist):
255
+ - INDEX.md, tech-stack.md, architecture.md, conventions-design.md, conventions-dev.md, conventions-test.md, conventions-build.md
256
+ - If document missing → Display `[Missing]` instead of link
257
+
258
+ 2. **Conditionally include conventions-data.md**:
259
+ - If exists → Add link `[Data](...)`
260
+ - If not exists → Display `-` (dash, not [Missing])
261
+ - For `backend` platforms, typically include
262
+ - For `mobile` platforms without data layer, omit
263
+
264
+ 3. **Link Format**: Use short abbreviations to save space:
265
+ - `[Stack]` → tech-stack.md
266
+ - `[Arch]` → architecture.md
267
+ - `[Design]` → conventions-design.md
268
+ - `[Dev]` → conventions-dev.md
269
+ - `[Test]` → conventions-test.md
270
+ - `[Build]` → conventions-build.md (Required column)
271
+ - `[Data]` → conventions-data.md (Optional column, show `-` if missing)
272
+
273
+ #### Section 3: Quick Reference
274
+
275
+ Quick links organized by document type:
276
+
277
+ ```markdown
278
+ ## Quick Reference
279
+
280
+ ### Technology Stacks
281
+ - [Web Frontend - React](web-react/tech-stack.md)
282
+ - [Backend API - NestJS](backend-nestjs/tech-stack.md)
283
+
284
+ ### Architecture Guidelines
285
+ - [Web Frontend](web-react/architecture.md)
286
+ - [Backend API](backend-nestjs/architecture.md)
287
+
288
+ ### Design Conventions
289
+ - [Web Frontend](web-react/conventions-design.md)
290
+ - [Backend API](backend-nestjs/conventions-design.md)
291
+
292
+ ### Development Conventions
293
+ - [Web Frontend](web-react/conventions-dev.md)
294
+ - [Backend API](backend-nestjs/conventions-dev.md)
295
+
296
+ ### Testing Conventions
297
+ - [Web Frontend](web-react/conventions-test.md)
298
+ - [Backend API](backend-nestjs/conventions-test.md)
299
+ ```
300
+
301
+ #### Section 4: Agent-to-Platform Mapping
302
+
303
+ Critical section that defines how Agents map to platform documentation. **Must dynamically adjust based on actual document availability**:
304
+
305
+ ```markdown
306
+ ## Agent-to-Platform Mapping
307
+
308
+ This section maps dynamically generated Agents to their respective platform documentation.
309
+
310
+ ### Web Frontend (web-react)
311
+
312
+ | Agent Role | Agent Name | Documentation Path |
313
+ |------------|------------|-------------------|
314
+ | Designer | speccrew-designer-web-react | [speccrew-workspace/knowledges/techs/web-react/](web-react/) |
315
+ | Developer | speccrew-dev-web-react | [speccrew-workspace/knowledges/techs/web-react/](web-react/) |
316
+ | Tester | speccrew-test-web-react | [speccrew-workspace/knowledges/techs/web-react/](web-react/) |
317
+
318
+ **Key Documents for Web Agents:**
319
+ - Designer: [architecture.md](web-react/architecture.md), [conventions-design.md](web-react/conventions-design.md), [ui-style/ui-style-guide.md](web-react/ui-style/ui-style-guide.md)
320
+ - If bizs pipeline executed: Also reference [ui-style-patterns/](web-react/ui-style-patterns/) for business UI patterns
321
+ - Developer: [conventions-dev.md](web-react/conventions-dev.md), [conventions-build.md](web-react/conventions-build.md)
322
+ - Tester: [conventions-test.md](web-react/conventions-test.md), [conventions-build.md](web-react/conventions-build.md)
323
+
324
+ ### Backend API (backend-nestjs)
325
+
326
+ | Agent Role | Agent Name | Documentation Path |
327
+ |------------|------------|-------------------|
328
+ | Designer | speccrew-designer-backend-nestjs | [speccrew-workspace/knowledges/techs/backend-nestjs/](backend-nestjs/) |
329
+ | Developer | speccrew-dev-backend-nestjs | [speccrew-workspace/knowledges/techs/backend-nestjs/](backend-nestjs/) |
330
+ | Tester | speccrew-test-backend-nestjs | [speccrew-workspace/knowledges/techs/backend-nestjs/](backend-nestjs/) |
331
+
332
+ **Key Documents for Backend Agents:**
333
+ - Designer: [architecture.md](backend-nestjs/architecture.md), [conventions-design.md](backend-nestjs/conventions-design.md), [conventions-data.md](backend-nestjs/conventions-data.md)
334
+ - Developer: [conventions-dev.md](backend-nestjs/conventions-dev.md), [conventions-build.md](backend-nestjs/conventions-build.md), [conventions-data.md](backend-nestjs/conventions-data.md)
335
+ - Tester: [conventions-test.md](backend-nestjs/conventions-test.md), [conventions-build.md](backend-nestjs/conventions-build.md)
336
+
337
+ ### Mobile App (mobile-uniapp) - Example without conventions-data.md
338
+
339
+ | Agent Role | Agent Name | Documentation Path |
340
+ |------------|------------|-------------------|
341
+ | Designer | speccrew-designer-mobile-uniapp | [speccrew-workspace/knowledges/techs/mobile-uniapp/](mobile-uniapp/) |
342
+ | Developer | speccrew-dev-mobile-uniapp | [speccrew-workspace/knowledges/techs/mobile-uniapp/](mobile-uniapp/) |
343
+ | Tester | speccrew-test-mobile-uniapp | [speccrew-workspace/knowledges/techs/mobile-uniapp/](mobile-uniapp/) |
344
+
345
+ **Key Documents for Mobile Agents:**
346
+ - Designer: [architecture.md](mobile-uniapp/architecture.md), [conventions-design.md](mobile-uniapp/conventions-design.md), [ui-style/ui-style-guide.md](mobile-uniapp/ui-style/ui-style-guide.md)
347
+ - If bizs pipeline executed: Also reference [ui-style-patterns/](mobile-uniapp/ui-style-patterns/) for business UI patterns
348
+ - Developer: [conventions-dev.md](mobile-uniapp/conventions-dev.md), [conventions-build.md](mobile-uniapp/conventions-build.md)
349
+ - Tester: [conventions-test.md](mobile-uniapp/conventions-test.md), [conventions-build.md](mobile-uniapp/conventions-build.md)
350
+ ```
351
+
352
+ **Dynamic Adjustment Rules:**
353
+
354
+ 1. **Designer Agent Documents**:
355
+ - Primary: architecture.md, conventions-design.md, ui-style/ui-style-guide.md
356
+ - Optional: conventions-data.md (if data layer involved)
357
+ - Optional: ui-style-patterns/ directory (if bizs pipeline Stage 3.5 executed)
358
+ - Note: For frontend/mobile platforms, Designer should reference both ui-style/ (tech perspective) and ui-style-patterns/ (business perspective, if exists)
359
+
360
+ 2. **Developer Agent Documents**:
361
+ - Primary: conventions-dev.md, conventions-build.md
362
+ - Optional: conventions-data.md
363
+ - Note: Developer needs conventions-build.md for build process, environment configuration, and CI/CD conventions
364
+
365
+ 3. **Tester Agent Documents**:
366
+ - Primary: conventions-test.md, conventions-build.md
367
+ - Optional: conventions-data.md (for database testing)
368
+ - Note: Tester needs conventions-build.md for CI/CD pipeline and test environment configuration
369
+
370
+ **UI Style Directory Reference Guide**:
371
+
372
+ For frontend platforms (web, mobile, desktop), the INDEX.md should document both UI style directories:
373
+
374
+ | Directory | Managed By | Content | Reference Condition |
375
+ |-----------|------------|---------|---------------------|
376
+ | `ui-style/` | techs pipeline Stage 2 | Framework-level design system | Always reference for frontend platforms |
377
+ | `ui-style-patterns/` | bizs pipeline Stage 3.5 | Business UI patterns | Only reference if directory exists |
378
+
379
+ #### Section 5: Document Guide
380
+
381
+ Explain what each document type contains:
382
+
383
+ ```markdown
384
+ ## Document Guide
385
+
386
+ ### INDEX.md (per platform)
387
+ Platform-specific overview and navigation.
388
+
389
+ ### tech-stack.md
390
+ Framework versions, dependencies, build tools, and configuration files.
391
+
392
+ ### architecture.md
393
+ Architecture patterns, layering, component organization, and design patterns.
394
+
395
+ ### conventions-design.md
396
+ Design principles, patterns, and guidelines for detailed design work.
397
+
398
+ ### conventions-dev.md
399
+ Naming conventions, code style, directory structure, and Git conventions.
400
+
401
+ ### conventions-test.md
402
+ Testing frameworks, coverage requirements, and testing patterns.
403
+
404
+ ### conventions-build.md
405
+ Build process, environment configuration, CI/CD pipelines, and deployment conventions.
406
+
407
+ ### conventions-data.md
408
+ Data modeling, ORM usage, and database conventions (if applicable).
409
+ ```
410
+
411
+ #### Section 6: Usage Guide
412
+
413
+ How to use the technology knowledge:
414
+
415
+ ```markdown
416
+ ## Usage Guide
417
+
418
+ ### For Designer Agents
419
+ 1. Read [architecture.md] for platform architecture patterns
420
+ 2. Read [conventions-design.md] for design principles
421
+ 3. Reference [tech-stack.md] for technology capabilities
422
+
423
+ ### For Developer Agents
424
+ 1. Read [conventions-dev.md] for coding standards
425
+ 2. Read [conventions-test.md] for testing requirements
426
+ 3. Reference [architecture.md] when implementation details are unclear
427
+
428
+ ### For Tester Agents
429
+ 1. Read [conventions-test.md] for testing standards
430
+ 2. Reference [conventions-design.md] to understand design intent
431
+ ```
432
+
433
+ ### Step 5: Write Output
434
+
435
+ Write the generated INDEX.md to `{{output_path}}/INDEX.md`.
436
+
437
+ ### Step 6: Report Results
438
+
439
+ ```
440
+ Stage 3 completed: Root Technology Index Generated
441
+ - Platforms Indexed: {{platform_count}}
442
+ - web-react: ✓
443
+ - backend-nestjs: ✓
444
+ - Root Index: {{output_path}}/INDEX.md
445
+ - Agent Mappings: Documented for all platforms
446
+ ```
447
+
448
+ ## Template
449
+
450
+ Use template at `templates/INDEX-TEMPLATE.md`:
451
+
452
+ **Template Variables:**
453
+ - `{{generated_at}}`: ISO timestamp
454
+ - `{{source_path}}`: Source path
455
+ - `{{platform_count}}`: Number of platforms
456
+ - `{{#each platforms}}`: Loop through platforms
457
+ - `{{platform_id}}`: Platform identifier
458
+ - `{{platform_type}}`: Platform type
459
+ - `{{framework}}`: Framework name
460
+ - `{{language}}`: Programming language
461
+
462
+ ## Checklist
463
+
464
+ ### Pre-Generation
465
+ - [ ] techs-manifest.json read successfully
466
+ - [ ] Platform list extracted from manifest
467
+
468
+ ### Dynamic Document Detection
469
+ - [ ] Each platform directory scanned for actual document existence
470
+ - [ ] Document availability map created for each platform
471
+ - [ ] Required documents verified (INDEX.md, tech-stack.md, architecture.md, conventions-design.md, conventions-dev.md, conventions-test.md, conventions-build.md)
472
+ - [ ] Optional conventions-data.md existence checked per platform
473
+
474
+ ### Content Generation
475
+ - [ ] Platform summaries extracted from existing INDEX.md files
476
+ - [ ] Root INDEX.md generated with all sections
477
+ - [ ] **Platform Overview table**: Links dynamically generated based on actual document existence
478
+ - [ ] **Agent-to-Platform mapping**: Document recommendations adjusted per platform
479
+ - [ ] Document guide included
480
+ - [ ] Usage guide included
481
+
482
+ ### Quality & Validation
483
+ - [ ] No broken links to non-existent documents
484
+ - [ ] conventions-data.md links only included for platforms where it exists
485
+ - [ ] **Source traceability**: `<cite>` block added to root INDEX.md
486
+ - [ ] **Source traceability**: Section Source annotations added at end of major sections
487
+ - [ ] Output file written successfully
488
+ - [ ] Results reported with document availability summary
489
+