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,392 @@
1
+ ---
2
+ name: speccrew-knowledge-techs-generate-ui-style
3
+ description: Generate UI style analysis documents for a specific frontend platform. Analyzes page types, components, layouts, and styling conventions from source code. Split from techs-generate for parallel execution with conventions worker. Only applicable to frontend platforms (web, mobile, desktop).
4
+ tools: Read, Write, Glob, Grep, Skill
5
+ ---
6
+
7
+ # Stage 2: Generate Platform UI Style Documents
8
+
9
+ Generate comprehensive UI style documentation for a specific frontend platform by analyzing its source code structure, components, and styling patterns.
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
+ ## Prerequisite
20
+
21
+ This skill ONLY applies to frontend platforms. The dispatcher MUST check platform_type before invoking:
22
+ - `web` → Execute this skill
23
+ - `mobile` → Execute this skill
24
+ - `desktop` → Execute this skill
25
+ - `backend` → DO NOT invoke this skill
26
+ - `api` → DO NOT invoke this skill
27
+
28
+ ## Trigger Scenarios
29
+
30
+ - "Generate UI style documents for {platform}"
31
+ - "Analyze UI components and layouts"
32
+ - "Extract design system from {platform}"
33
+
34
+ ## User
35
+
36
+ Worker Agent (speccrew-task-worker)
37
+
38
+ ## Input
39
+
40
+ - `platform_id`: Platform identifier (e.g., "web-react", "mobile-uniapp")
41
+ - `platform_type`: Platform type (web, mobile, desktop)
42
+ - `framework`: Primary framework (react, vue, angular, uniapp, flutter, etc.)
43
+ - `source_path`: Platform source directory
44
+ - `output_path`: Output directory (e.g., speccrew-workspace/knowledges/techs/{platform_id}/)
45
+ - `language`: Target language ("zh", "en") - **REQUIRED**
46
+ - `completed_dir`: (Optional) Directory for completion marker and analysis report
47
+
48
+ ## Output
49
+
50
+ ```
51
+ {output_path}/
52
+ └── ui-style/
53
+ ├── ui-style-guide.md # Main UI style guide (Required)
54
+ ├── page-types/
55
+ │ ├── page-type-summary.md # Page type overview (Required)
56
+ │ └── [type]-pages.md # Per-type detail (Dynamic)
57
+ ├── components/
58
+ │ ├── component-library.md # Component catalog (Required)
59
+ │ ├── common-components.md # Common components (Required)
60
+ │ ├── business-components.md # Business components (Required)
61
+ │ └── {component-name}.md # Per-component detail (Dynamic)
62
+ ├── layouts/
63
+ │ ├── page-layouts.md # Layout patterns (Required)
64
+ │ ├── navigation-patterns.md # Navigation patterns (Required)
65
+ │ └── {layout-name}-layout.md # Per-layout detail (Dynamic)
66
+ └── styles/
67
+ ├── color-system.md # Color system (Required)
68
+ ├── typography.md # Typography (Required)
69
+ └── spacing-system.md # Spacing system (Required)
70
+ ```
71
+
72
+ ## Directory Ownership
73
+
74
+ - `ui-style/` — Fully managed by this skill (techs pipeline)
75
+ - Contains: ui-style-guide.md, styles/, page-types/, components/, layouts/
76
+ - Source: Framework-level design system analysis from source code
77
+ - `ui-style-patterns/` — Managed by bizs pipeline (Stage 3.5: bizs-ui-style-extract)
78
+ - Contains: Business pattern aggregation from feature documents
79
+ - NOT created or written by this skill
80
+ - May not exist if bizs pipeline has not been executed
81
+
82
+ ## Workflow
83
+
84
+ ```mermaid
85
+ flowchart TD
86
+ Start --> Step0[Step 0: Read UI Style Templates]
87
+ Step0 --> Step1[Step 1: UI Style Analysis]
88
+ Step1 --> Step2[Step 2: Write Output Files]
89
+ Step2 --> Step3[Step 3: Generate Analysis Report]
90
+ Step3 --> Step4[Step 4: Report Results]
91
+ Step4 --> End
92
+ ```
93
+
94
+ ### Step 0: Read UI Style Templates
95
+
96
+ Before processing, read all UI style template files to understand the required content structure:
97
+
98
+ - **Read**: `../speccrew-knowledge-techs-generate/templates/COMPONENT-LIBRARY-TEMPLATE.md` - Component catalog structure
99
+ - **Read**: `../speccrew-knowledge-techs-generate/templates/PAGE-LAYOUTS-TEMPLATE.md` - Layout patterns structure
100
+ - **Read**: `../speccrew-knowledge-techs-generate/templates/PAGE-TYPE-SUMMARY-TEMPLATE.md` - Page type classification structure
101
+ - **Read**: `../speccrew-knowledge-techs-generate/templates/COLOR-SYSTEM-TEMPLATE.md` - Color and typography system structure
102
+ - **Purpose**: Understand template structure for fallback path copy+fill workflow
103
+
104
+ ### Step 1: UI Style Analysis
105
+
106
+ **Directory Ownership**:
107
+ - `ui-style/` — Fully managed by techs pipeline (this skill)
108
+ - Contains: ui-style-guide.md, styles/, page-types/, components/, layouts/
109
+ - Source: Framework-level design system analysis from source code
110
+ - `ui-style-patterns/` — Managed by bizs pipeline (Stage 3.5: bizs-ui-style-extract)
111
+ - Contains: Business pattern aggregation from feature documents
112
+ - NOT created or written by this skill
113
+ - May not exist if bizs pipeline has not been executed
114
+
115
+ **Primary Path (UI Analyzer Available and Succeeds)**:
116
+
117
+ 1. **CRITICAL**: Use the Skill tool to invoke `speccrew-knowledge-techs-ui-analyze` with these exact parameters:
118
+ ```
119
+ skill: "speccrew-knowledge-techs-ui-analyze"
120
+ args: "source_path={source_path};platform_id={platform_id};platform_type={platform_type};framework={framework};output_path={output_path}/ui-style/;language={language}"
121
+ ```
122
+
123
+ 2. **Wait for completion** and verify output files exist:
124
+ - `{output_path}/ui-style/ui-style-guide.md` ✓
125
+ - `{output_path}/ui-style/page-types/page-type-summary.md` ✓
126
+ - `{output_path}/ui-style/page-types/[type]-pages.md` (one per discovered type) ✓
127
+ - `{output_path}/ui-style/components/component-library.md` ✓
128
+ - `{output_path}/ui-style/components/common-components.md` ✓
129
+ - `{output_path}/ui-style/components/business-components.md` ✓
130
+ - `{output_path}/ui-style/layouts/page-layouts.md` ✓
131
+ - `{output_path}/ui-style/layouts/navigation-patterns.md` ✓
132
+ - `{output_path}/ui-style/styles/color-system.md` ✓
133
+ - `{output_path}/ui-style/styles/typography.md` ✓
134
+ - `{output_path}/ui-style/styles/spacing-system.md` ✓
135
+
136
+ 3. If all outputs verified → proceed to next step
137
+ 4. Record: `ui_analysis_level = "full"`
138
+
139
+ **Secondary Path (UI Analyzer Fails or Partial Output)**:
140
+
141
+ **MANDATORY: UI Style Fallback Path - Complete Directory Structure**
142
+
143
+ When UI Style Analyzer fails or produces incomplete output, you MUST create ALL of the following directories and files. Skipping ANY item is FORBIDDEN.
144
+
145
+ **Required Directory Structure (MANDATORY - ALL items must be created):**
146
+ ```
147
+ ui-style/
148
+ ├── ui-style-guide.md ← MANDATORY
149
+ ├── page-types/
150
+ │ └── page-type-summary.md ← MANDATORY
151
+ ├── components/
152
+ │ └── component-library.md ← MANDATORY
153
+ ├── layouts/
154
+ │ └── page-layouts.md ← MANDATORY
155
+ └── styles/
156
+ └── color-system.md ← MANDATORY
157
+ ```
158
+
159
+ **Self-Verification Checklist (MUST complete before reporting success):**
160
+ - [ ] ui-style/ui-style-guide.md exists and has content
161
+ - [ ] ui-style/page-types/page-type-summary.md exists and has content
162
+ - [ ] ui-style/components/component-library.md exists and has content
163
+ - [ ] ui-style/layouts/page-layouts.md exists and has content
164
+ - [ ] ui-style/styles/color-system.md exists and has content
165
+
166
+ If ANY file in the checklist is missing, you MUST create it before proceeding to the next step. Do NOT report "completed" with missing files.
167
+
168
+ **Execution Steps:**
169
+
170
+ 1. Create ui-style directory structure:
171
+ `{output_path}/ui-style/`, `{output_path}/ui-style/page-types/`, `{output_path}/ui-style/components/`, `{output_path}/ui-style/layouts/`, `{output_path}/ui-style/styles/`
172
+
173
+ 2. Generate minimal ui-style-guide.md by manually scanning source code:
174
+ - Design system: identify UI framework from dependencies (Material UI, Ant Design, Tailwind, etc.)
175
+ - Color system: scan for CSS variables, theme files, or color constants in `{source_path}/src/styles/` or `{source_path}/src/theme/`
176
+ - Typography: scan for font-family declarations
177
+ - Component library: list directories under `{source_path}/src/components/`
178
+ - Page types: list directories/files under `{source_path}/src/pages/` or `{source_path}/src/views/`
179
+
180
+ 3. Content structure for minimal ui-style-guide.md:
181
+ ```markdown
182
+ # UI Style Guide - {platform_id}
183
+
184
+ > Note: Generated from manual source code inspection. Automated UI analysis was unavailable.
185
+
186
+ ## Design System
187
+ - UI Framework: {detected from package.json}
188
+ - CSS Approach: {CSS Modules / Tailwind / styled-components / SCSS - detected from config}
189
+
190
+ ## Component Library Overview
191
+ {list component directories found}
192
+
193
+ ## Page Types Identified
194
+ {list page directories/files found}
195
+
196
+ ## Styling Configuration
197
+ {extract from tailwind.config / theme file / CSS variables file}
198
+ ```
199
+
200
+ 4. **MANDATORY: UI Style Fallback - Copy Template + Fill Workflow**
201
+
202
+ For each ui-style sub-document, copy the template and use search_replace to fill:
203
+
204
+ **4.1 component-library.md**:
205
+ - Copy `templates/COMPONENT-LIBRARY-TEMPLATE.md` to `{output_path}/ui-style/components/component-library.md`
206
+ - Use search_replace to fill each AI-TAG section with data extracted from source code
207
+ - MUST include props tables for at least the top 5 most-used components
208
+ - Fill: COMPONENT_CATEGORIES, API_REFERENCE, COMPOSITION_PATTERNS, AGENT_GUIDE sections
209
+
210
+ **4.2 page-layouts.md**:
211
+ - Copy `templates/PAGE-LAYOUTS-TEMPLATE.md` to `{output_path}/ui-style/layouts/page-layouts.md`
212
+ - Fill layout types, slots, responsive behavior from source analysis
213
+ - Fill: LAYOUT_TYPES, LAYOUT_DETAILS, NAVIGATION sections
214
+
215
+ **4.3 page-type-summary.md**:
216
+ - Copy `templates/PAGE-TYPE-SUMMARY-TEMPLATE.md` to `{output_path}/ui-style/page-types/page-type-summary.md`
217
+ - Fill page classifications and routing conventions
218
+ - Fill: PAGE_TYPES, PAGE_TYPE_DETAILS, ROUTING sections
219
+
220
+ **4.4 color-system.md**:
221
+ - Copy `templates/COLOR-SYSTEM-TEMPLATE.md` to `{output_path}/ui-style/styles/color-system.md`
222
+ - Fill theme colors, functional colors, typography from CSS/SCSS variables
223
+ - Fill: THEME_COLORS, FUNCTIONAL_COLORS, SEMANTIC_TOKENS, TYPOGRAPHY, SPACING sections
224
+
225
+ 5. Record: `ui_analysis_level = "minimal"`
226
+
227
+ **Tertiary Path (No UI Analysis Possible)**:
228
+
229
+ If source code scanning also fails (e.g., non-standard structure):
230
+
231
+ 1. Create `{output_path}/ui-style/ui-style-guide.md` with references only:
232
+ ```markdown
233
+ # UI Style Guide - {platform_id}
234
+
235
+ > Note: Automated and manual UI analysis were not possible for this platform.
236
+ > Manual inspection of source code is required.
237
+
238
+ ## References
239
+ - Source components: {source_path}/src/components/ (if exists)
240
+ - Source pages: {source_path}/src/pages/ (if exists)
241
+ - Style files: {source_path}/src/styles/ (if exists)
242
+ - Package dependencies: {source_path}/package.json
243
+ ```
244
+
245
+ 2. Record: `ui_analysis_level = "reference_only"`
246
+
247
+ **Note**: The conventions-design.md reference to ui-style is maintained by the conventions worker.
248
+
249
+ ### Step 2: Write Output Files
250
+
251
+ Create output directory structure if not exists:
252
+
253
+ 1. **Create directories**:
254
+ - `{output_path}/ui-style/`
255
+ - `{output_path}/ui-style/page-types/`
256
+ - `{output_path}/ui-style/components/`
257
+ - `{output_path}/ui-style/layouts/`
258
+ - `{output_path}/ui-style/styles/`
259
+
260
+ 2. **Write all generated ui-style documents** to their respective directories.
261
+
262
+ ### Step 3: Generate Analysis Report
263
+
264
+ **Output file**: `{completed_dir}/{platform_id}.analysis-ui-style.json`
265
+
266
+ **Report Format**:
267
+
268
+ ```json
269
+ {
270
+ "platform_id": "{platform_id}",
271
+ "platform_type": "{platform_type}",
272
+ "worker_type": "ui-style",
273
+ "analyzed_at": "{ISO 8601 timestamp}",
274
+ "ui_analysis_level": "full | minimal | reference_only",
275
+ "topics": {
276
+ "page_types": {
277
+ "status": "found | not_found | partial",
278
+ "count": N,
279
+ "files_analyzed": ["src/views/..."],
280
+ "notes": "..."
281
+ },
282
+ "components": {
283
+ "status": "found | not_found | partial",
284
+ "common_count": N,
285
+ "business_count": N,
286
+ "files_analyzed": ["src/components/..."],
287
+ "notes": "..."
288
+ },
289
+ "layouts": {
290
+ "status": "found | not_found | partial",
291
+ "count": N,
292
+ "files_analyzed": ["src/layouts/..."],
293
+ "notes": "..."
294
+ },
295
+ "styles": {
296
+ "status": "found | not_found | partial",
297
+ "files_analyzed": ["src/styles/..."],
298
+ "notes": "..."
299
+ }
300
+ },
301
+ "documents_generated": ["ui-style-guide.md", "page-types/page-type-summary.md", ...],
302
+ "source_dirs_scanned": ["src/views/", "src/components/", "src/styles/", "src/layouts/"],
303
+ "coverage_summary": {
304
+ "total_topics": 4,
305
+ "found": N,
306
+ "not_found": N,
307
+ "partial": N,
308
+ "coverage_percent": N
309
+ }
310
+ }
311
+ ```
312
+
313
+ **Rules**:
314
+ - Every topic from the analysis MUST appear in the `topics` object
315
+ - `files_analyzed` MUST list the actual file paths you read (relative to source_path)
316
+ - `status` MUST be one of: `found`, `not_found`, `partial`
317
+ - `coverage_percent` = (topics_found + topics_partial) / topics_total * 100, rounded to integer
318
+ - `documents_generated` MUST list all .md files actually created
319
+ - Use `create_file` to write this JSON file (this is the ONE exception where create_file is allowed — for JSON output files)
320
+
321
+ ### Step 4: Report Results
322
+
323
+ **Completion marker file**: `{completed_dir}/{platform_id}.done-ui-style.json`
324
+
325
+ **Format**:
326
+
327
+ ```json
328
+ {
329
+ "platform_id": "{platform_id}",
330
+ "worker_type": "ui-style",
331
+ "status": "completed",
332
+ "ui_analysis_level": "full | minimal | reference_only",
333
+ "documents_generated": [...],
334
+ "analysis_file": "{platform_id}.analysis-ui-style.json",
335
+ "completed_at": "{ISO timestamp}"
336
+ }
337
+ ```
338
+
339
+ **Console output**:
340
+
341
+ ```
342
+ Platform UI Style Documents Generated: {platform_id}
343
+ - ui-style-guide.md: ✓ (analysis level: {ui_analysis_level})
344
+ - page-types/page-type-summary.md: ✓
345
+ - components/component-library.md: ✓
346
+ - layouts/page-layouts.md: ✓
347
+ - styles/color-system.md: ✓
348
+ - Output Directory: {output_path}/ui-style/
349
+ - Analysis Report: {completed_dir}/{platform_id}.analysis-ui-style.json
350
+ - Completion Marker: {completed_dir}/{platform_id}.done-ui-style.json
351
+ ```
352
+
353
+ ---
354
+
355
+ ## Quality Requirements
356
+
357
+ - ui-style-guide.md MUST have substantial content (not just template placeholders)
358
+ - At least 5 mandatory files MUST exist (see Self-Verification Checklist)
359
+ - Analysis report MUST honestly reflect coverage level
360
+ - All paths in documents MUST be relative (never absolute or file:// protocol)
361
+
362
+ ## Error Handling
363
+
364
+ - If ui-analyze skill invocation fails → Execute Secondary Path (template fill)
365
+ - If source code structure is non-standard and cannot be analyzed → Execute Tertiary Path (reference only)
366
+ - Any path MUST output the done file and analysis file
367
+ - Never report "completed" with missing mandatory files
368
+
369
+ ## Checklist
370
+
371
+ ### Pre-Generation
372
+ - [ ] Platform type verified (web/mobile/desktop only)
373
+ - [ ] Template files read and understood
374
+ - [ ] Source directory structure scanned
375
+
376
+ ### UI Style Analysis
377
+ - [ ] `speccrew-knowledge-techs-ui-analyze` skill invoked (Primary Path)
378
+ - [ ] If Primary Path failed → Secondary Path executed
379
+ - [ ] If Secondary Path failed → Tertiary Path executed
380
+ - [ ] All mandatory files created per Self-Verification Checklist
381
+
382
+ ### Output Verification
383
+ - [ ] ui-style/ui-style-guide.md exists and has content
384
+ - [ ] ui-style/page-types/page-type-summary.md exists and has content
385
+ - [ ] ui-style/components/component-library.md exists and has content
386
+ - [ ] ui-style/layouts/page-layouts.md exists and has content
387
+ - [ ] ui-style/styles/color-system.md exists and has content
388
+
389
+ ### Reporting
390
+ - [ ] Analysis report generated: `{platform_id}.analysis-ui-style.json`
391
+ - [ ] Completion marker generated: `{platform_id}.done-ui-style.json`
392
+ - [ ] Console output reported with correct status