speccrew 0.6.34 → 0.6.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.speccrew/agents/speccrew-system-designer.md +101 -94
- package/.speccrew/agents/speccrew-team-leader-xml.md +3 -3
- package/.speccrew/skills/speccrew-knowledge-techs-dispatch-xml/SKILL.md +863 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate-conventions-xml/SKILL.md +859 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate-quality-xml/SKILL.md +687 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate-ui-style-xml/SKILL.md +597 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate-xml/SKILL.md +297 -0
- package/.speccrew/skills/speccrew-knowledge-techs-index-xml/SKILL.md +277 -0
- package/.speccrew/skills/speccrew-knowledge-techs-init-xml/SKILL.md +309 -0
- package/package.json +1 -1
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: speccrew-knowledge-techs-init-xml
|
|
3
|
+
description: Stage 1 of technology knowledge initialization - Scan source code to detect technology platforms and generate techs-manifest.json using XML workflow blocks. Identifies web, mobile, backend, and desktop platforms by analyzing configuration files and project structure. Used by Worker Agent to kick off the techs pipeline.
|
|
4
|
+
tools: Read, Write, Glob, Grep, SearchCodebase, Skill
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Stage 1: Detect Technology Platforms (XML Workflow)
|
|
8
|
+
|
|
9
|
+
Scan project source code to identify all technology platforms, extract configuration metadata, and generate techs-manifest.json for downstream document generation.
|
|
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
|
+
**All output content must be in the target language only.**
|
|
20
|
+
|
|
21
|
+
## Trigger Scenarios
|
|
22
|
+
|
|
23
|
+
- "Initialize technology knowledge base"
|
|
24
|
+
- "Scan source code for technology platforms"
|
|
25
|
+
- "Detect tech stacks in project"
|
|
26
|
+
- "Generate techs manifest"
|
|
27
|
+
|
|
28
|
+
## User
|
|
29
|
+
|
|
30
|
+
Worker Agent (speccrew-task-worker)
|
|
31
|
+
|
|
32
|
+
## Input
|
|
33
|
+
|
|
34
|
+
- `source_path`: Source code root directory (default: project root)
|
|
35
|
+
- `output_path`: Output directory for techs-manifest.json (default: `speccrew-workspace/knowledges/base/sync-state/knowledge-techs/`)
|
|
36
|
+
- `language`: Target language for generated content (e.g., "zh", "en") - **REQUIRED**
|
|
37
|
+
|
|
38
|
+
## Output
|
|
39
|
+
|
|
40
|
+
- `{{output_path}}/techs-manifest.json` - Technology platform manifest for pipeline orchestration
|
|
41
|
+
|
|
42
|
+
## Workflow
|
|
43
|
+
|
|
44
|
+
<!--
|
|
45
|
+
== Block Types ==
|
|
46
|
+
input : Workflow input parameters (required=mandatory, default=default value)
|
|
47
|
+
output : Workflow output results (from=data source variable)
|
|
48
|
+
task : Execute action (action: run-skill | run-script | dispatch-to-worker)
|
|
49
|
+
gateway : Conditional branch/gate (mode: exclusive | guard | parallel)
|
|
50
|
+
loop : Iterate over collection (over=collection, as=current item)
|
|
51
|
+
event : Log/confirm/signal (action: log | confirm | signal)
|
|
52
|
+
error-handler : Exception handling (try > catch > finally)
|
|
53
|
+
checkpoint : Persistent milestone (name=checkpoint name, verify=verification condition)
|
|
54
|
+
rule : Constraint declaration (level: forbidden | mandatory | note)
|
|
55
|
+
-->
|
|
56
|
+
|
|
57
|
+
<workflow>
|
|
58
|
+
|
|
59
|
+
<!-- Global Rules -->
|
|
60
|
+
<rule id="GLOBAL-R1" level="mandatory" description="Continuous Execution: Execute all steps in sequence without interruption. Worker must complete all steps before reporting results." />
|
|
61
|
+
<rule id="GLOBAL-R-TECHSTACK" level="mandatory" description="Technology Stack Constraint: Detected platforms must align with standardized platform identifiers from platform-mapping.json." />
|
|
62
|
+
|
|
63
|
+
<!-- Input Block -->
|
|
64
|
+
<input name="source_path" type="string" required="false" default="project-root" description="Source code root directory" />
|
|
65
|
+
<input name="output_path" type="string" required="false" default="speccrew-workspace/knowledges/base/sync-state/knowledge-techs/" description="Output directory for techs-manifest.json" />
|
|
66
|
+
<input name="language" type="string" required="true" description="Target language for generated content" />
|
|
67
|
+
|
|
68
|
+
<!-- Step 1: Scan for Platform Indicators -->
|
|
69
|
+
<task id="step1-scan-platforms" action="scan" description="Analyze project structure to detect technology platforms">
|
|
70
|
+
|
|
71
|
+
<!-- Step 1a: Read Platform Mapping Config -->
|
|
72
|
+
<task id="step1a-read-config" action="read" description="Read platform-mapping.json for standardized identifiers">
|
|
73
|
+
<read-file path="speccrew-workspace/docs/configs/platform-mapping.json" />
|
|
74
|
+
</task>
|
|
75
|
+
|
|
76
|
+
<!-- Step 1b: Detect Web Platforms -->
|
|
77
|
+
<gateway id="detect-web" mode="parallel" description="Detect web platform indicators">
|
|
78
|
+
<check signal="package.json + react dependency" platform-id="web-react" framework="react" />
|
|
79
|
+
<check signal="package.json + vue dependency" platform-id="web-vue" framework="vue" />
|
|
80
|
+
<check signal="package.json + @angular/core" platform-id="web-angular" framework="angular" />
|
|
81
|
+
<check signal="package.json + next" platform-id="web-nextjs" framework="nextjs" />
|
|
82
|
+
<check signal="package.json + nuxt" platform-id="web-nuxt" framework="nuxt" />
|
|
83
|
+
<check signal="package.json + svelte" platform-id="web-svelte" framework="svelte" />
|
|
84
|
+
</gateway>
|
|
85
|
+
|
|
86
|
+
<!-- Step 1c: Detect Mobile Platforms -->
|
|
87
|
+
<gateway id="detect-mobile" mode="parallel" description="Detect mobile platform indicators">
|
|
88
|
+
<check signal="pubspec.yaml" platform-id="mobile-flutter" framework="flutter" />
|
|
89
|
+
<check signal="package.json + react-native" platform-id="mobile-react-native" framework="react-native" />
|
|
90
|
+
<check signal=".xcodeproj / Package.swift" platform-id="mobile-ios" framework="ios" />
|
|
91
|
+
<check signal="build.gradle + AndroidManifest.xml" platform-id="mobile-android" framework="android" />
|
|
92
|
+
<check signal="manifest.json + pages.json" platform-id="mobile-uniapp" framework="uniapp" />
|
|
93
|
+
<check signal="project.config.json + app.json" platform-id="mobile-miniprogram" framework="miniprogram" />
|
|
94
|
+
</gateway>
|
|
95
|
+
|
|
96
|
+
<!-- Step 1d: Detect Backend Platforms -->
|
|
97
|
+
<gateway id="detect-backend" mode="parallel" description="Detect backend platform indicators">
|
|
98
|
+
<check signal="package.json + @nestjs/core" platform-id="backend-nestjs" framework="nestjs" />
|
|
99
|
+
<check signal="package.json + express" platform-id="backend-express" framework="express" />
|
|
100
|
+
<check signal="package.json + fastify" platform-id="backend-fastify" framework="fastify" />
|
|
101
|
+
<check signal="pom.xml + spring-boot" platform-id="backend-spring" framework="spring" />
|
|
102
|
+
<check signal="requirements.txt + django" platform-id="backend-django" framework="django" />
|
|
103
|
+
<check signal="requirements.txt + fastapi" platform-id="backend-fastapi" framework="fastapi" />
|
|
104
|
+
<check signal="go.mod" platform-id="backend-go" framework="go" />
|
|
105
|
+
<check signal="Cargo.toml" platform-id="backend-rust" framework="rust" />
|
|
106
|
+
</gateway>
|
|
107
|
+
|
|
108
|
+
<!-- Step 1e: Detect Desktop Platforms -->
|
|
109
|
+
<gateway id="detect-desktop" mode="parallel" description="Detect desktop platform indicators">
|
|
110
|
+
<check signal="package.json + electron" platform-id="desktop-electron" framework="electron" />
|
|
111
|
+
<check signal="tauri.conf.json" platform-id="desktop-tauri" framework="tauri" />
|
|
112
|
+
<check signal=".csproj + WPF references" platform-id="desktop-wpf" framework="wpf" />
|
|
113
|
+
<check signal=".csproj + WinForms" platform-id="desktop-winforms" framework="winforms" />
|
|
114
|
+
<check signal=".pro file + Qt" platform-id="desktop-qt" framework="qt" />
|
|
115
|
+
</gateway>
|
|
116
|
+
|
|
117
|
+
</task>
|
|
118
|
+
|
|
119
|
+
<!-- Step 2: Extract Platform Metadata -->
|
|
120
|
+
<loop id="step2-extract-metadata" over="detected_platforms" as="platform" description="Extract metadata for each detected platform">
|
|
121
|
+
<task action="extract" description="Extract platform metadata fields">
|
|
122
|
+
<extract-fields>
|
|
123
|
+
<field name="platform_id" value="{platform_type}-{framework}" />
|
|
124
|
+
<field name="platform_type" from="detected_type" />
|
|
125
|
+
<field name="framework" from="detected_framework" />
|
|
126
|
+
<field name="language" from="config_file_analysis" />
|
|
127
|
+
<field name="source_path" from="directory_location" />
|
|
128
|
+
<field name="config_files" from="file_list" />
|
|
129
|
+
<field name="convention_files" from="lint_format_configs" />
|
|
130
|
+
</extract-fields>
|
|
131
|
+
</task>
|
|
132
|
+
</loop>
|
|
133
|
+
|
|
134
|
+
<!-- Step 3: Get Timestamp -->
|
|
135
|
+
<task id="step3-get-timestamp" action="run-skill" description="Get current timestamp for generated_at field">
|
|
136
|
+
<run-skill skill="speccrew-get-timestamp" />
|
|
137
|
+
</task>
|
|
138
|
+
|
|
139
|
+
<!-- Step 4: Generate techs-manifest.json -->
|
|
140
|
+
<task id="step4-generate-manifest" action="generate" description="Generate techs-manifest.json with detected platforms">
|
|
141
|
+
<generate-json output="{output_path}/techs-manifest.json">
|
|
142
|
+
<field name="generated_at" value="{timestamp}" />
|
|
143
|
+
<field name="source_path" value="{source_path}" />
|
|
144
|
+
<field name="language" value="{language}" />
|
|
145
|
+
<array name="platforms" from="detected_platforms_metadata" />
|
|
146
|
+
</generate-json>
|
|
147
|
+
</task>
|
|
148
|
+
|
|
149
|
+
<!-- Step 5: Report Results -->
|
|
150
|
+
<event id="step5-report" action="log" description="Report detection results">
|
|
151
|
+
<report format="structured">
|
|
152
|
+
Stage 1 completed: Technology Platform Detection
|
|
153
|
+
- Platforms Detected: {platform_count}
|
|
154
|
+
- web-react: React 18.2.0, TypeScript 5.3.0
|
|
155
|
+
- backend-nestjs: NestJS 10.0.0, TypeScript 5.3.0
|
|
156
|
+
- Configuration Files Found: {config_file_count}
|
|
157
|
+
- Output: {output_path}/techs-manifest.json
|
|
158
|
+
- Next: Dispatch parallel tasks for Stage 2 (Tech Document Generation)
|
|
159
|
+
</report>
|
|
160
|
+
</event>
|
|
161
|
+
|
|
162
|
+
<!-- Output Block -->
|
|
163
|
+
<output name="status" from="detection_status" />
|
|
164
|
+
<output name="platforms_detected" from="detected_platforms_list" />
|
|
165
|
+
<output name="manifest_path" from="manifest_file_path" />
|
|
166
|
+
|
|
167
|
+
</workflow>
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## Platform Detection Reference
|
|
172
|
+
|
|
173
|
+
### Web Platform Detection
|
|
174
|
+
|
|
175
|
+
**Indicators:**
|
|
176
|
+
|
|
177
|
+
| Signal | Platform ID | Framework |
|
|
178
|
+
|--------|-------------|-----------|
|
|
179
|
+
| package.json + react dependency | web-react | React |
|
|
180
|
+
| package.json + vue dependency | web-vue | Vue |
|
|
181
|
+
| package.json + @angular/core | web-angular | Angular |
|
|
182
|
+
| package.json + next | web-nextjs | Next.js |
|
|
183
|
+
| package.json + nuxt | web-nuxt | Nuxt |
|
|
184
|
+
| package.json + svelte | web-svelte | Svelte |
|
|
185
|
+
|
|
186
|
+
**Configuration Files to Capture:**
|
|
187
|
+
- package.json
|
|
188
|
+
- tsconfig.json
|
|
189
|
+
- vite.config.* / webpack.config.* / next.config.* / nuxt.config.*
|
|
190
|
+
- tailwind.config.* / postcss.config.*
|
|
191
|
+
- .eslintrc.* / .prettierrc.*
|
|
192
|
+
|
|
193
|
+
### Mobile Platform Detection
|
|
194
|
+
|
|
195
|
+
**Indicators:**
|
|
196
|
+
|
|
197
|
+
| Signal | Platform ID | Framework |
|
|
198
|
+
|--------|-------------|-----------|
|
|
199
|
+
| pubspec.yaml | mobile-flutter | Flutter |
|
|
200
|
+
| package.json + react-native | mobile-react-native | React Native |
|
|
201
|
+
| .xcodeproj / Package.swift | mobile-ios | iOS (Swift) |
|
|
202
|
+
| build.gradle + AndroidManifest.xml | mobile-android | Android (Kotlin/Java) |
|
|
203
|
+
| manifest.json + pages.json (uni-app) | mobile-uniapp | UniApp |
|
|
204
|
+
| project.config.json + app.json | mobile-miniprogram | Mini Program |
|
|
205
|
+
|
|
206
|
+
**Configuration Files to Capture:**
|
|
207
|
+
- Flutter: pubspec.yaml, analysis_options.yaml
|
|
208
|
+
- React Native: package.json, metro.config.js
|
|
209
|
+
- iOS: Package.swift, Podfile, Info.plist
|
|
210
|
+
- Android: build.gradle, AndroidManifest.xml
|
|
211
|
+
|
|
212
|
+
### Backend Platform Detection
|
|
213
|
+
|
|
214
|
+
**Indicators:**
|
|
215
|
+
|
|
216
|
+
| Signal | Platform ID | Framework |
|
|
217
|
+
|--------|-------------|-----------|
|
|
218
|
+
| package.json + @nestjs/core | backend-nestjs | NestJS |
|
|
219
|
+
| package.json + express | backend-express | Express |
|
|
220
|
+
| package.json + fastify | backend-fastify | Fastify |
|
|
221
|
+
| pom.xml + spring-boot | backend-spring | Spring Boot |
|
|
222
|
+
| build.gradle + spring-boot | backend-spring | Spring Boot |
|
|
223
|
+
| requirements.txt + django | backend-django | Django |
|
|
224
|
+
| requirements.txt + fastapi | backend-fastapi | FastAPI |
|
|
225
|
+
| go.mod | backend-go | Go |
|
|
226
|
+
| Cargo.toml | backend-rust | Rust (Actix/Rocket) |
|
|
227
|
+
|
|
228
|
+
**Configuration Files to Capture:**
|
|
229
|
+
- Node.js: package.json, tsconfig.json, nest-cli.json
|
|
230
|
+
- Java: pom.xml, build.gradle, application.yml/properties
|
|
231
|
+
- Python: requirements.txt, pyproject.toml
|
|
232
|
+
- Go: go.mod, go.sum
|
|
233
|
+
- Rust: Cargo.toml
|
|
234
|
+
|
|
235
|
+
### Desktop Platform Detection
|
|
236
|
+
|
|
237
|
+
**Indicators:**
|
|
238
|
+
|
|
239
|
+
| Signal | Platform ID | Framework |
|
|
240
|
+
|--------|-------------|-----------|
|
|
241
|
+
| package.json + electron | desktop-electron | Electron |
|
|
242
|
+
| tauri.conf.json | desktop-tauri | Tauri |
|
|
243
|
+
| .csproj + WPF references | desktop-wpf | WPF |
|
|
244
|
+
| .csproj + WinForms | desktop-winforms | WinForms |
|
|
245
|
+
| .pro file + Qt | desktop-qt | Qt |
|
|
246
|
+
|
|
247
|
+
**Configuration Files to Capture:**
|
|
248
|
+
- Electron: package.json, electron-builder.yml
|
|
249
|
+
- Tauri: tauri.conf.json, Cargo.toml
|
|
250
|
+
- WPF/WinForms: .csproj, App.xaml
|
|
251
|
+
- Qt: .pro, CMakeLists.txt
|
|
252
|
+
|
|
253
|
+
---
|
|
254
|
+
|
|
255
|
+
## Metadata Extraction Fields
|
|
256
|
+
|
|
257
|
+
| Field | Source | Example |
|
|
258
|
+
|-------|--------|---------|
|
|
259
|
+
| platform_id | `{{platform_type}}-{{framework}}` | web-react, backend-nestjs |
|
|
260
|
+
| platform_type | Platform category | web, mobile, backend, desktop |
|
|
261
|
+
| framework | Primary framework | react, nestjs, flutter |
|
|
262
|
+
| language | Primary language | typescript, kotlin, dart |
|
|
263
|
+
| source_path | Relative source directory | src/web, src/server |
|
|
264
|
+
| config_files | List of config file paths | ["package.json", "tsconfig.json"] |
|
|
265
|
+
| convention_files | Lint/format config files | [".eslintrc.js", ".prettierrc"] |
|
|
266
|
+
|
|
267
|
+
---
|
|
268
|
+
|
|
269
|
+
## Platform Mapping Consistency
|
|
270
|
+
|
|
271
|
+
Ensure consistency with modules.json by using standardized platform identifiers from `platform-mapping.json`:
|
|
272
|
+
|
|
273
|
+
**Key Rules:**
|
|
274
|
+
- `platform_id` format: `{{platform_type}}-{{framework}}` (e.g., `mobile-uniapp`, `web-vue`)
|
|
275
|
+
- `platform_type` must match between techs-manifest.json and modules.json
|
|
276
|
+
- `framework` maps to `platform_subtype` in modules.json
|
|
277
|
+
|
|
278
|
+
**Example Mapping:**
|
|
279
|
+
|
|
280
|
+
| platform_id | platform_type | framework | platform_subtype (for bizs-init) |
|
|
281
|
+
|-------------|---------------|-----------|----------------------------------|
|
|
282
|
+
| web-vue | web | vue | vue |
|
|
283
|
+
| mobile-uniapp | mobile | uniapp | uniapp |
|
|
284
|
+
| backend-spring | backend | spring | spring |
|
|
285
|
+
|
|
286
|
+
---
|
|
287
|
+
|
|
288
|
+
## Checklist
|
|
289
|
+
|
|
290
|
+
- [ ] All platform indicators checked
|
|
291
|
+
- [ ] Platform metadata extracted (platform_id, type, framework, language)
|
|
292
|
+
- [ ] Configuration files identified and paths recorded
|
|
293
|
+
- [ ] Convention files (eslint, prettier) identified
|
|
294
|
+
- [ ] techs-manifest.json generated with valid JSON structure
|
|
295
|
+
- [ ] **Source traceability**: All config_file paths recorded for downstream use
|
|
296
|
+
- [ ] Output path verified
|
|
297
|
+
- [ ] Results reported with platform summary
|
|
298
|
+
|
|
299
|
+
---
|
|
300
|
+
|
|
301
|
+
## CONTINUOUS EXECUTION RULES
|
|
302
|
+
|
|
303
|
+
This skill follows the continuous execution pattern defined in `GLOBAL-R1`:
|
|
304
|
+
|
|
305
|
+
1. **Sequential Execution**: All workflow steps must execute in the defined order without interruption.
|
|
306
|
+
2. **No User Prompts**: Worker must not pause for user confirmation between steps.
|
|
307
|
+
3. **Complete All Steps**: Worker must complete all steps before reporting results.
|
|
308
|
+
4. **Error Handling**: If any step fails, continue with remaining steps if possible, then report all errors together.
|
|
309
|
+
5. **Technology Stack Constraint**: Per `GLOBAL-R-TECHSTACK`, detected platforms must align with standardized platform identifiers from platform-mapping.json.
|