speccrew 0.6.68 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.speccrew/agents/speccrew-task-worker.md +1 -1
- package/.speccrew/agents/speccrew-team-leader.md +336 -189
- package/.speccrew/skills/speccrew-agentflow-manager/SKILL.md +161 -0
- package/.speccrew/skills/speccrew-agentflow-manager/workflow.agentflow.xml +347 -0
- package/.speccrew/skills/speccrew-deploy-build/SKILL.md +3 -56
- package/.speccrew/skills/speccrew-deploy-build/workflow.agentflow.xml +125 -0
- package/.speccrew/skills/speccrew-deploy-migrate/SKILL.md +3 -64
- package/.speccrew/skills/speccrew-deploy-migrate/workflow.agentflow.xml +135 -0
- package/.speccrew/skills/speccrew-deploy-smoke-test/SKILL.md +4 -156
- package/.speccrew/skills/speccrew-deploy-smoke-test/workflow.agentflow.xml +178 -0
- package/.speccrew/skills/speccrew-deploy-startup/SKILL.md +3 -135
- package/.speccrew/skills/speccrew-deploy-startup/workflow.agentflow.xml +223 -0
- package/.speccrew/skills/speccrew-dev-backend/SKILL.md +10 -2
- package/.speccrew/skills/speccrew-dev-backend/workflow.agentflow.xml +254 -0
- package/.speccrew/skills/speccrew-dev-desktop-electron/SKILL.md +10 -2
- package/.speccrew/skills/speccrew-dev-desktop-electron/workflow.agentflow.xml +259 -0
- package/.speccrew/skills/speccrew-dev-desktop-tauri/SKILL.md +10 -2
- package/.speccrew/skills/speccrew-dev-desktop-tauri/workflow.agentflow.xml +245 -0
- package/.speccrew/skills/speccrew-dev-frontend/SKILL.md +10 -2
- package/.speccrew/skills/speccrew-dev-frontend/workflow.agentflow.xml +262 -0
- package/.speccrew/skills/speccrew-dev-mobile/SKILL.md +10 -2
- package/.speccrew/skills/speccrew-dev-mobile/workflow.agentflow.xml +244 -0
- package/.speccrew/skills/speccrew-dev-review-backend/SKILL.md +10 -2
- package/.speccrew/skills/speccrew-dev-review-backend/workflow.agentflow.xml +251 -0
- package/.speccrew/skills/speccrew-dev-review-desktop/SKILL.md +10 -2
- package/.speccrew/skills/speccrew-dev-review-desktop/workflow.agentflow.xml +214 -0
- package/.speccrew/skills/speccrew-dev-review-frontend/SKILL.md +10 -2
- package/.speccrew/skills/speccrew-dev-review-frontend/workflow.agentflow.xml +213 -0
- package/.speccrew/skills/speccrew-dev-review-mobile/SKILL.md +10 -2
- package/.speccrew/skills/speccrew-dev-review-mobile/workflow.agentflow.xml +214 -0
- package/.speccrew/skills/speccrew-fd-api-contract/SKILL.md +7 -1
- package/.speccrew/skills/speccrew-fd-api-contract/workflow.agentflow.xml +222 -0
- package/.speccrew/skills/speccrew-fd-feature-analyze/SKILL.md +7 -1
- package/.speccrew/skills/speccrew-fd-feature-analyze/workflow.agentflow.xml +223 -0
- package/.speccrew/skills/speccrew-fd-feature-design/SKILL.md +7 -1
- package/.speccrew/skills/speccrew-fd-feature-design/workflow.agentflow.xml +322 -0
- package/.speccrew/skills/speccrew-get-timestamp/SKILL.md +3 -39
- package/.speccrew/skills/speccrew-get-timestamp/workflow.agentflow.xml +43 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/SKILL.md +57 -508
- package/.speccrew/skills/{speccrew-knowledge-bizs-api-analyze-xml/SKILL.md → speccrew-knowledge-bizs-api-analyze/workflow.agentflow.xml} +1 -154
- package/.speccrew/skills/speccrew-knowledge-bizs-api-graph/SKILL.md +73 -283
- package/.speccrew/skills/{speccrew-knowledge-bizs-api-graph-xml/SKILL.md → speccrew-knowledge-bizs-api-graph/workflow.agentflow.xml} +0 -298
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/SKILL.md +931 -801
- package/.speccrew/skills/{speccrew-knowledge-bizs-dispatch-xml/SKILL.md → speccrew-knowledge-bizs-dispatch/workflow.agentflow.xml} +42 -272
- package/.speccrew/skills/speccrew-knowledge-bizs-identify-entries/SKILL.md +263 -71
- package/.speccrew/skills/{speccrew-knowledge-bizs-identify-entries-xml/SKILL.md → speccrew-knowledge-bizs-identify-entries/workflow.agentflow.xml} +8 -184
- package/.speccrew/skills/speccrew-knowledge-bizs-init-features/SKILL.md +200 -181
- package/.speccrew/skills/{speccrew-knowledge-bizs-init-features-xml/SKILL.md → speccrew-knowledge-bizs-init-features/workflow.agentflow.xml} +7 -134
- package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/SKILL.md +5 -89
- package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/workflow.agentflow.xml +129 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/SKILL.md +454 -326
- package/.speccrew/skills/{speccrew-knowledge-bizs-ui-analyze-xml/SKILL.md → speccrew-knowledge-bizs-ui-analyze/workflow.agentflow.xml} +8 -128
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-graph/SKILL.md +302 -247
- package/.speccrew/skills/{speccrew-knowledge-bizs-ui-graph-xml/SKILL.md → speccrew-knowledge-bizs-ui-graph/workflow.agentflow.xml} +7 -199
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-style-extract/SKILL.md +267 -156
- package/.speccrew/skills/{speccrew-knowledge-bizs-ui-style-extract-xml/SKILL.md → speccrew-knowledge-bizs-ui-style-extract/workflow.agentflow.xml} +7 -151
- package/.speccrew/skills/speccrew-knowledge-graph-query/SKILL.md +3 -122
- package/.speccrew/skills/speccrew-knowledge-graph-query/workflow.agentflow.xml +106 -0
- package/.speccrew/skills/speccrew-knowledge-graph-write/SKILL.md +3 -80
- package/.speccrew/skills/speccrew-knowledge-graph-write/workflow.agentflow.xml +152 -0
- package/.speccrew/skills/speccrew-knowledge-module-summarize/SKILL.md +371 -265
- package/.speccrew/skills/{speccrew-knowledge-module-summarize-xml/SKILL.md → speccrew-knowledge-module-summarize/workflow.agentflow.xml} +7 -197
- package/.speccrew/skills/speccrew-knowledge-system-summarize/SKILL.md +45 -333
- package/.speccrew/skills/{speccrew-knowledge-system-summarize-xml/SKILL.md → speccrew-knowledge-system-summarize/workflow.agentflow.xml} +0 -177
- package/.speccrew/skills/speccrew-knowledge-techs-dispatch/SKILL.md +174 -727
- package/.speccrew/skills/{speccrew-knowledge-techs-dispatch-xml/SKILL.md → speccrew-knowledge-techs-dispatch/workflow.agentflow.xml} +10 -351
- package/.speccrew/skills/speccrew-knowledge-techs-generate/SKILL.md +20 -150
- package/.speccrew/skills/{speccrew-knowledge-techs-generate-xml/SKILL.md → speccrew-knowledge-techs-generate/workflow.agentflow.xml} +0 -169
- package/.speccrew/skills/speccrew-knowledge-techs-generate-conventions/SKILL.md +75 -587
- package/.speccrew/skills/{speccrew-knowledge-techs-generate-conventions-xml/SKILL.md → speccrew-knowledge-techs-generate-conventions/workflow.agentflow.xml} +0 -153
- package/.speccrew/skills/speccrew-knowledge-techs-generate-quality/SKILL.md +463 -297
- package/.speccrew/skills/{speccrew-knowledge-techs-generate-quality-xml/SKILL.md → speccrew-knowledge-techs-generate-quality/workflow.agentflow.xml} +0 -164
- package/.speccrew/skills/speccrew-knowledge-techs-generate-ui-style/SKILL.md +57 -292
- package/.speccrew/skills/{speccrew-knowledge-techs-generate-ui-style-xml/SKILL.md → speccrew-knowledge-techs-generate-ui-style/workflow.agentflow.xml} +2 -193
- package/.speccrew/skills/speccrew-knowledge-techs-index/SKILL.md +49 -335
- package/.speccrew/skills/{speccrew-knowledge-techs-index-xml/SKILL.md → speccrew-knowledge-techs-index/workflow.agentflow.xml} +0 -167
- package/.speccrew/skills/speccrew-knowledge-techs-init/SKILL.md +28 -109
- package/.speccrew/skills/{speccrew-knowledge-techs-init-xml/SKILL.md → speccrew-knowledge-techs-init/workflow.agentflow.xml} +0 -189
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/SKILL.md +3 -487
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/workflow.agentflow.xml +278 -0
- package/.speccrew/skills/speccrew-pm-knowledge-detector/SKILL.md +3 -71
- package/.speccrew/skills/speccrew-pm-knowledge-detector/workflow.agentflow.xml +108 -0
- package/.speccrew/skills/speccrew-pm-module-initializer/SKILL.md +3 -107
- package/.speccrew/skills/speccrew-pm-module-initializer/workflow.agentflow.xml +139 -0
- package/.speccrew/skills/speccrew-pm-module-matcher/SKILL.md +3 -115
- package/.speccrew/skills/speccrew-pm-module-matcher/workflow.agentflow.xml +146 -0
- package/.speccrew/skills/speccrew-pm-requirement-analysis/SKILL.md +3 -343
- package/.speccrew/skills/speccrew-pm-requirement-analysis/workflow.agentflow.xml +174 -0
- package/.speccrew/skills/speccrew-pm-requirement-assess/SKILL.md +3 -91
- package/.speccrew/skills/speccrew-pm-requirement-assess/workflow.agentflow.xml +173 -0
- package/.speccrew/skills/speccrew-pm-requirement-clarify/SKILL.md +3 -224
- package/.speccrew/skills/speccrew-pm-requirement-clarify/workflow.agentflow.xml +159 -0
- package/.speccrew/skills/speccrew-pm-requirement-model/SKILL.md +3 -275
- package/.speccrew/skills/speccrew-pm-requirement-model/workflow.agentflow.xml +210 -0
- package/.speccrew/skills/speccrew-pm-requirement-simple/SKILL.md +3 -76
- package/.speccrew/skills/speccrew-pm-requirement-simple/workflow.agentflow.xml +120 -0
- package/.speccrew/skills/speccrew-pm-sub-prd-generate/SKILL.md +7 -1
- package/.speccrew/skills/speccrew-pm-sub-prd-generate/workflow.agentflow.xml +218 -0
- package/.speccrew/skills/speccrew-sd-backend/SKILL.md +7 -1
- package/.speccrew/skills/speccrew-sd-backend/workflow.agentflow.xml +264 -0
- package/.speccrew/skills/speccrew-sd-desktop/SKILL.md +7 -1
- package/.speccrew/skills/speccrew-sd-desktop/workflow.agentflow.xml +288 -0
- package/.speccrew/skills/speccrew-sd-framework-evaluate/SKILL.md +7 -1
- package/.speccrew/skills/speccrew-sd-framework-evaluate/workflow.agentflow.xml +235 -0
- package/.speccrew/skills/speccrew-sd-frontend/SKILL.md +7 -1
- package/.speccrew/skills/speccrew-sd-frontend/workflow.agentflow.xml +299 -0
- package/.speccrew/skills/speccrew-sd-mobile/SKILL.md +7 -1
- package/.speccrew/skills/speccrew-sd-mobile/workflow.agentflow.xml +301 -0
- package/.speccrew/skills/speccrew-test-case-design/SKILL.md +165 -284
- package/.speccrew/skills/speccrew-test-case-design/workflow.agentflow.xml +210 -0
- package/.speccrew/skills/speccrew-test-code-gen/SKILL.md +204 -324
- package/.speccrew/skills/speccrew-test-code-gen/workflow.agentflow.xml +265 -0
- package/.speccrew/skills/speccrew-test-reporter/SKILL.md +205 -184
- package/.speccrew/skills/speccrew-test-reporter/workflow.agentflow.xml +284 -0
- package/.speccrew/skills/speccrew-test-runner/SKILL.md +242 -241
- package/.speccrew/skills/speccrew-test-runner/workflow.agentflow.xml +314 -0
- package/bin/cli.js +8 -1
- package/lib/commands/validate.js +565 -0
- package/package.json +1 -1
- package/workspace-template/docs/rules/{xml-workflow-spec.md → agentflow-spec.md} +5 -5
- package/workspace-template/scripts/validate-agentflow.js +637 -0
- package/.speccrew/agents/speccrew-team-leader-xml.md +0 -480
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/STATUS-FORMATS.md +0 -99
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/batch-orchestrator.js +0 -176
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/get-next-batch.js +0 -150
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/get-pending-features.js +0 -106
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/mark-stale.js +0 -249
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/merge-features.js +0 -300
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/process-batch-results.js +0 -915
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/update-feature-status.js +0 -226
- package/.speccrew/skills/speccrew-knowledge-bizs-init-features/examples/features.json +0 -34
- package/.speccrew/skills/speccrew-knowledge-bizs-init-features/scripts/generate-inventory.js +0 -1071
- package/.speccrew/skills/speccrew-knowledge-bizs-init-features/scripts/test-inventory.js +0 -26
- package/.speccrew/skills/speccrew-knowledge-techs-dispatch/STATUS-FORMATS.md +0 -550
|
@@ -1,21 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: speccrew-knowledge-techs-generate-conventions
|
|
3
|
-
description: Generate technology convention documents (INDEX, tech-stack, architecture, conventions-*) for a specific platform. Extracts tech stack, architecture, and development conventions from configuration files and source code. Split from techs-generate for parallel execution with ui-style worker.
|
|
3
|
+
description: Generate technology convention documents (INDEX, tech-stack, architecture, conventions-*) for a specific platform using XML Block workflow. Extracts tech stack, architecture, and development conventions from configuration files and source code. Split from techs-generate for parallel execution with ui-style worker.
|
|
4
4
|
tools: Read, Write, Glob, Grep
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# Stage 2: Generate Platform Convention Documents
|
|
7
|
+
# Stage 2: Generate Platform Convention Documents (XML Block Workflow)
|
|
8
8
|
|
|
9
9
|
Generate comprehensive convention documentation for a specific platform by analyzing its configuration files and source code structure. This skill focuses on conventions documents only; UI style analysis is handled by the separate techs-generate-ui-style worker.
|
|
10
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
11
|
## Trigger Scenarios
|
|
20
12
|
|
|
21
13
|
- "Generate convention documents for {platform}"
|
|
@@ -28,31 +20,42 @@ Generate comprehensive convention documentation for a specific platform by analy
|
|
|
28
20
|
|
|
29
21
|
Worker Agent (speccrew-task-worker)
|
|
30
22
|
|
|
31
|
-
## Input
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
23
|
+
## Input Variables
|
|
24
|
+
|
|
25
|
+
| Variable | Type | Description | Example |
|
|
26
|
+
|----------|------|-------------|---------|
|
|
27
|
+
| `${platform_id}` | string | Platform identifier | `"web-react"`, `"backend-nestjs"` |
|
|
28
|
+
| `${platform_type}` | string | Platform type | `web`, `mobile`, `backend`, `desktop`, `api` |
|
|
29
|
+
| `${framework}` | string | Primary framework | `react`, `nestjs`, `flutter`, etc. |
|
|
30
|
+
| `${source_path}` | string | Platform source directory | `"frontend-web"` |
|
|
31
|
+
| `${config_files}` | array | List of configuration file paths | `["package.json", "tsconfig.json"]` |
|
|
32
|
+
| `${convention_files}` | array | List of convention file paths | `[".eslintrc.js", ".prettierrc"]` |
|
|
33
|
+
| `${output_path}` | string | Output directory for generated documents | `speccrew-workspace/knowledges/techs/{platform_id}/` |
|
|
34
|
+
| `${language}` | string | Target language for generated content | `"zh"`, `"en"` |
|
|
35
|
+
| `${completed_dir}` | string | (Optional) Directory for analysis coverage report output | `speccrew-workspace/iterations/...` |
|
|
36
|
+
|
|
37
|
+
## Output Variables
|
|
38
|
+
|
|
39
|
+
| Variable | Type | Description |
|
|
40
|
+
|----------|------|-------------|
|
|
41
|
+
| `${status}` | string | Generation status: `"success"`, `"partial"`, or `"failed"` |
|
|
42
|
+
| `${documents_generated}` | array | List of generated document filenames |
|
|
43
|
+
| `${analysis_file}` | string | Path to the analysis coverage report |
|
|
44
|
+
| `${message}` | string | Summary message for status update |
|
|
42
45
|
|
|
43
46
|
## Output
|
|
44
47
|
|
|
45
|
-
Generate the following documents in
|
|
48
|
+
Generate the following documents in `${output_path}/`:
|
|
46
49
|
|
|
47
50
|
```
|
|
48
|
-
{output_path}/
|
|
51
|
+
${output_path}/
|
|
49
52
|
├── INDEX.md # Platform technology index (Required)
|
|
50
53
|
├── tech-stack.md # Technology stack details (Required)
|
|
51
54
|
├── architecture.md # Architecture conventions (Required)
|
|
52
55
|
├── conventions-design.md # Design conventions (Required)
|
|
53
56
|
├── conventions-dev.md # Development conventions (Required)
|
|
54
|
-
├── conventions-unit-test.md
|
|
55
|
-
├── conventions-system-test.md
|
|
57
|
+
├── conventions-unit-test.md # Unit testing conventions (Required)
|
|
58
|
+
├── conventions-system-test.md # System testing conventions (Required)
|
|
56
59
|
├── conventions-build.md # Build & Deployment conventions (Required)
|
|
57
60
|
└── conventions-data.md # Data conventions (Optional)
|
|
58
61
|
```
|
|
@@ -67,582 +70,58 @@ Generate the following documents in `{output_path}/`:
|
|
|
67
70
|
| `desktop` | All 8 docs | conventions-data.md | **Default No** - Based on actual tech stack |
|
|
68
71
|
| `api` | All 8 docs | conventions-data.md | **Conditional** - Based on whether data layer exists |
|
|
69
72
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
**Step 1: Check Platform Type**
|
|
73
|
-
- If `backend` → **Generate** (always)
|
|
74
|
-
- If `web`/`mobile`/`desktop`/`api` → Proceed to Step 2
|
|
75
|
-
|
|
76
|
-
**Step 2: Detect Data Layer (for non-backend platforms)**
|
|
77
|
-
|
|
78
|
-
Check configuration files for data layer indicators:
|
|
79
|
-
|
|
80
|
-
| Indicator | Technology | Action |
|
|
81
|
-
|-----------|------------|--------|
|
|
82
|
-
| `prisma` in package.json dependencies | Prisma ORM | Generate conventions-data.md |
|
|
83
|
-
| `typeorm` in package.json dependencies | TypeORM | Generate conventions-data.md |
|
|
84
|
-
| `sequelize` in package.json dependencies | Sequelize | Generate conventions-data.md |
|
|
85
|
-
| `mongoose` in package.json dependencies | Mongoose | Generate conventions-data.md |
|
|
86
|
-
| `drizzle-orm` in package.json dependencies | Drizzle ORM | Generate conventions-data.md |
|
|
87
|
-
| `firebase` / `@react-native-firebase` | Firebase | Generate conventions-data.md (lightweight) |
|
|
88
|
-
| `sqlite` / `realm` / `@realm/react` | SQLite/Realm | Generate conventions-data.md (lightweight) |
|
|
89
|
-
| `core-data` in iOS project | Core Data | Generate conventions-data.md |
|
|
90
|
-
| `room` in Android project | Room Persistence | Generate conventions-data.md |
|
|
91
|
-
| None detected | - | **Skip** conventions-data.md |
|
|
92
|
-
|
|
93
|
-
**Step 3: Report Decision**
|
|
94
|
-
```
|
|
95
|
-
Platform: {platform_id}
|
|
96
|
-
Type: {platform_type}
|
|
97
|
-
Framework: {framework}
|
|
98
|
-
Data Layer Detected: {yes/no/technology}
|
|
99
|
-
Generate conventions-data.md: {yes/no}
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
## Workflow
|
|
103
|
-
|
|
104
|
-
```mermaid
|
|
105
|
-
flowchart TD
|
|
106
|
-
Start --> Step0[Step 0: Read Document Templates]
|
|
107
|
-
Step0 --> Step1[Step 1: Read Configuration Files]
|
|
108
|
-
Step1 --> Step2[Step 2: Extract Technology Stack]
|
|
109
|
-
Step2 --> Step3[Step 3: Analyze Conventions]
|
|
110
|
-
Step3 --> Step4[Step 4: Generate Documents]
|
|
111
|
-
Step4 --> Step5[Step 5: Write Output Files]
|
|
112
|
-
Step5 --> Step6[Step 6: Generate Analysis Coverage Report]
|
|
113
|
-
Step6 --> Step7[Step 7: Report Results]
|
|
114
|
-
Step7 --> End
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
### Step 0: Read Document Templates
|
|
118
|
-
|
|
119
|
-
Before processing, read all template files to understand the required content structure for each document type:
|
|
120
|
-
- **Read**: `../speccrew-knowledge-techs-generate/templates/INDEX-TEMPLATE.md` - Platform overview and navigation hub structure
|
|
121
|
-
- **Read**: `../speccrew-knowledge-techs-generate/templates/TECH-STACK-TEMPLATE.md` - Technology stack details structure
|
|
122
|
-
- **Read**: `../speccrew-knowledge-techs-generate/templates/ARCHITECTURE-TEMPLATE.md` - Architecture patterns and conventions structure
|
|
123
|
-
- **Read**: `../speccrew-knowledge-techs-generate/templates/CONVENTIONS-DESIGN-TEMPLATE.md` - Design principles and patterns structure
|
|
124
|
-
- **Read**: `../speccrew-knowledge-techs-generate/templates/CONVENTIONS-DEV-TEMPLATE.md` - Development conventions structure
|
|
125
|
-
- **Read**: `../speccrew-knowledge-techs-generate/templates/CONVENTIONS-UNIT-TEST-TEMPLATE.md` - Unit testing conventions structure
|
|
126
|
-
- **Read**: `../speccrew-knowledge-techs-generate/templates/CONVENTIONS-SYSTEM-TEST-TEMPLATE.md` - System testing conventions structure
|
|
127
|
-
- **Read**: `../speccrew-knowledge-techs-generate/templates/CONVENTIONS-BUILD-TEMPLATE.md` - Build and deployment conventions structure
|
|
128
|
-
- **Read**: `../speccrew-knowledge-techs-generate/templates/CONVENTIONS-DATA-TEMPLATE.md` - Data layer conventions structure (if applicable)
|
|
129
|
-
- **Purpose**: Understand each template's chapters and example content requirements
|
|
130
|
-
- **Key principle**: Extract information from source code according to template section requirements
|
|
131
|
-
|
|
132
|
-
### Step 1: Read Configuration Files
|
|
133
|
-
|
|
134
|
-
Read and parse all configuration files for the platform:
|
|
135
|
-
|
|
136
|
-
**Primary Config Files:**
|
|
137
|
-
- package.json / pom.xml / requirements.txt / pubspec.yaml / go.mod
|
|
138
|
-
- tsconfig.json / jsconfig.json
|
|
139
|
-
- Build config: vite.config.* / webpack.config.* / next.config.* / nest-cli.json
|
|
140
|
-
|
|
141
|
-
**Convention Files:**
|
|
142
|
-
- ESLint: .eslintrc.* / eslint.config.*
|
|
143
|
-
- Prettier: .prettierrc.* / prettier.config.*
|
|
144
|
-
- Testing: jest.config.* / vitest.config.* / pytest.ini
|
|
145
|
-
- Git: .gitignore, .gitattributes
|
|
146
|
-
|
|
147
|
-
### Step 2: Extract Technology Stack
|
|
148
|
-
|
|
149
|
-
Parse configuration files to extract:
|
|
150
|
-
|
|
151
|
-
**Core Framework:**
|
|
152
|
-
- Name and version from dependencies
|
|
153
|
-
- Primary language (TypeScript, JavaScript, Dart, etc.)
|
|
154
|
-
|
|
155
|
-
**Dependencies:**
|
|
156
|
-
- Production dependencies (grouped by purpose)
|
|
157
|
-
- Development dependencies
|
|
158
|
-
- Key library versions
|
|
159
|
-
|
|
160
|
-
**Build Tools:**
|
|
161
|
-
- Bundler (Vite, Webpack, Rollup)
|
|
162
|
-
- Transpiler (TypeScript, Babel)
|
|
163
|
-
- Task runner (npm scripts, Gradle, Maven)
|
|
164
|
-
|
|
165
|
-
**Example Extraction:**
|
|
166
|
-
```json
|
|
167
|
-
{
|
|
168
|
-
"framework": "React",
|
|
169
|
-
"framework_version": "18.2.0",
|
|
170
|
-
"language": "TypeScript",
|
|
171
|
-
"language_version": "5.3.0",
|
|
172
|
-
"build_tool": "Vite 5.0.0",
|
|
173
|
-
"key_dependencies": [
|
|
174
|
-
{ "name": "react-router-dom", "version": "6.20.0", "purpose": "Routing" },
|
|
175
|
-
{ "name": "zustand", "version": "4.4.0", "purpose": "State Management" }
|
|
176
|
-
]
|
|
177
|
-
}
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
### Step 3: Analyze Conventions
|
|
181
|
-
|
|
182
|
-
1. **Read Configuration**:
|
|
183
|
-
- Read `speccrew-workspace/docs/rules/mermaid-rule.md` - Get Mermaid diagram compatibility guidelines
|
|
184
|
-
|
|
185
|
-
2. **Extract conventions from configuration files:**
|
|
186
|
-
|
|
187
|
-
**From ESLint Config:**
|
|
188
|
-
- Enabled rules
|
|
189
|
-
- Code style preferences
|
|
190
|
-
- Import/export patterns
|
|
191
|
-
|
|
192
|
-
**From Prettier Config:**
|
|
193
|
-
- Formatting rules (semi, quotes, tabWidth)
|
|
194
|
-
- Print width
|
|
195
|
-
|
|
196
|
-
**From Project Structure:**
|
|
197
|
-
- Directory conventions (src/, components/, utils/)
|
|
198
|
-
- File naming patterns
|
|
199
|
-
- Module organization
|
|
200
|
-
|
|
201
|
-
3. **Apply Mermaid Rules**:
|
|
202
|
-
- Follow compatibility guidelines from `mermaid-rule.md`
|
|
203
|
-
- See: [Mermaid Diagram Guide](#mermaid-diagram-guide)
|
|
204
|
-
|
|
205
|
-
### Domain-Specific Convention Extraction (MANDATORY)
|
|
206
|
-
|
|
207
|
-
In addition to the general conventions above, you MUST actively search for and extract the following domain-specific topics. These are critical for downstream Agents (solution, design, development, testing).
|
|
208
|
-
|
|
209
|
-
**For Frontend Platforms (web-vue, mobile-uniapp, etc.):**
|
|
210
|
-
|
|
211
|
-
| Topic | What to Search For | Where to Look |
|
|
212
|
-
|-------|-------------------|---------------|
|
|
213
|
-
| **i18n/Internationalization** | i18n framework config, locale files, translation key patterns | `locales/`, `i18n/`, `lang/`, package.json deps |
|
|
214
|
-
| **Authorization & Permissions** | Permission directives (`v-hasPermi`), route guards, permission stores | `permission/`, `router/`, `store/`, `utils/auth` |
|
|
215
|
-
| **Menu Registration** | Menu config, dynamic menu loading, menu-to-route mapping | `router/`, `store/`, `layout/`, API calls for menus |
|
|
216
|
-
| **Data Dictionary** | Dict components (`DictTag`), dict stores, dict API calls | `components/Dict`, `utils/dict`, `store/` |
|
|
217
|
-
| **Logging** | Error reporting service, console policy, error boundaries | `utils/log`, `plugins/sentry`, error handling config |
|
|
218
|
-
| **API Request Layer** | Axios/fetch instance, interceptors, token refresh, base URL config | `utils/request`, `api/`, `config/`, `interceptors/` |
|
|
219
|
-
| **Data Validation** | Form validation rules, custom validators, validation timing | `utils/validate`, form schemas, component props validation |
|
|
220
|
-
| **File Upload** | Upload components, upload API calls, file size limits | `components/Upload`, `api/file`, `utils/upload` |
|
|
221
|
-
|
|
222
|
-
**For Backend Platforms (backend-spring, etc.):**
|
|
223
|
-
|
|
224
|
-
| Topic | What to Search For | Where to Look |
|
|
225
|
-
|-------|-------------------|---------------|
|
|
226
|
-
| **Authorization & Permissions** | `@PreAuthorize`, `@DataPermission`, security config, permission enums | Security config, controller annotations, framework modules |
|
|
227
|
-
| **Data Dictionary** | Dict entity, dict service, dict cache, dict enum patterns | `dict/`, `system/` module, enum classes |
|
|
228
|
-
| **Multi-tenancy** | Tenant interceptor/plugin, tenant column, tenant context, `@TenantIgnore` | MyBatis plugins, framework config, base entity |
|
|
229
|
-
| **Backend i18n** | messages.properties, MessageSource, i18n config, ValidationMessages | `resources/i18n/`, `messages*.properties`, i18n config beans |
|
|
230
|
-
| **Logging** | Logger usage, log config (logback.xml/log4j2), operation log annotation, audit trail | `logback*.xml`, `log4j2*.xml`, `@OperateLog`, `operatelog/` module |
|
|
231
|
-
| **Exception Handling** | GlobalExceptionHandler, business exceptions, error codes, error response format | `handler/`, `exception/`, `enums/ErrorCode`, `GlobalExceptionHandler` |
|
|
232
|
-
| **Caching** | @Cacheable, RedisTemplate, cache key patterns, cache config | `cache/`, `redis/`, `CacheConfig`, `@Cacheable` annotations |
|
|
233
|
-
| **Data Validation** | @Valid, @Validated, custom validators, validation groups | DTO classes, `validator/`, `@NotNull/@Size` patterns |
|
|
234
|
-
| **Scheduled Jobs** | @Scheduled, Quartz config, XXL-Job handler, cron expressions | `job/`, `task/`, `schedule/`, `@Scheduled` methods |
|
|
235
|
-
| **File Storage** | FileService, upload API, OSS/S3 config, file path patterns | `file/`, `infra/file/`, `FileClient`, storage config |
|
|
236
|
-
|
|
237
|
-
**If a topic is not found in the source code**, explicitly state "Not applicable" in the corresponding template section. Do NOT leave the section empty or skip it silently.
|
|
238
|
-
|
|
239
|
-
### Analysis Tracking (MANDATORY)
|
|
240
|
-
|
|
241
|
-
During Step 3, you MUST maintain an internal tracking record for each topic you search. For every topic in the tables above:
|
|
242
|
-
|
|
243
|
-
1. **Search** the source code using the "Where to Look" paths
|
|
244
|
-
2. **Record** the result:
|
|
245
|
-
- `found` — Topic implementation found, relevant files identified
|
|
246
|
-
- `not_found` — Searched all suggested paths, no implementation exists
|
|
247
|
-
- `partial` — Some aspects found but incomplete
|
|
248
|
-
3. **List** all files you actually read/analyzed for that topic
|
|
249
|
-
|
|
250
|
-
This tracking data will be used in Step 6 to generate the analysis coverage report. Do NOT skip any topic — if a topic is not applicable to this platform type, record it as `not_found` with a note.
|
|
251
|
-
|
|
252
|
-
**Topic Checklist by Platform Type:**
|
|
253
|
-
|
|
254
|
-
**Frontend Topics (web, mobile, desktop):**
|
|
255
|
-
1. i18n / Internationalization
|
|
256
|
-
2. Authorization & Permissions
|
|
257
|
-
3. Menu Registration & Routing
|
|
258
|
-
4. Data Dictionary Usage
|
|
259
|
-
5. Logging & Error Reporting
|
|
260
|
-
6. API Request Layer (Axios/fetch)
|
|
261
|
-
7. Data Validation
|
|
262
|
-
8. File Upload & Storage
|
|
263
|
-
9. UI Style System is handled by the separate techs-generate-ui-style worker
|
|
264
|
-
|
|
265
|
-
**Backend Topics (backend):**
|
|
266
|
-
1. Backend Internationalization
|
|
267
|
-
2. Authorization & Permissions (annotations, data permission)
|
|
268
|
-
3. Data Dictionary Management
|
|
269
|
-
4. Logging & Audit Trail
|
|
270
|
-
5. Exception Handling & Error Codes
|
|
271
|
-
6. Caching Strategy
|
|
272
|
-
7. Data Validation (JSR 380, custom validators)
|
|
273
|
-
8. Scheduled Jobs & Task Scheduling
|
|
274
|
-
9. File Storage
|
|
275
|
-
10. Multi-tenancy
|
|
276
|
-
|
|
277
|
-
### Step 4: Generate Documents (MANDATORY: Copy Template + Fill)
|
|
278
|
-
|
|
279
|
-
**CRITICAL**: This step MUST follow the template fill workflow - copy template first, then fill sections.
|
|
280
|
-
|
|
281
|
-
1. **For Each Document, Follow This Workflow**:
|
|
282
|
-
|
|
283
|
-
**Step 4.1: Copy Template File**
|
|
284
|
-
- Copy the corresponding template file to the output path:
|
|
285
|
-
- `../speccrew-knowledge-techs-generate/templates/INDEX-TEMPLATE.md` → `{output_path}/INDEX.md`
|
|
286
|
-
- `../speccrew-knowledge-techs-generate/templates/TECH-STACK-TEMPLATE.md` → `{output_path}/tech-stack.md`
|
|
287
|
-
- `../speccrew-knowledge-techs-generate/templates/ARCHITECTURE-TEMPLATE.md` → `{output_path}/architecture.md`
|
|
288
|
-
- `../speccrew-knowledge-techs-generate/templates/CONVENTIONS-DESIGN-TEMPLATE.md` → `{output_path}/conventions-design.md`
|
|
289
|
-
- `../speccrew-knowledge-techs-generate/templates/CONVENTIONS-DEV-TEMPLATE.md` → `{output_path}/conventions-dev.md`
|
|
290
|
-
- `../speccrew-knowledge-techs-generate/templates/CONVENTIONS-UNIT-TEST-TEMPLATE.md` → `{output_path}/conventions-unit-test.md`
|
|
291
|
-
- `../speccrew-knowledge-techs-generate/templates/CONVENTIONS-SYSTEM-TEST-TEMPLATE.md` → `{output_path}/conventions-system-test.md`
|
|
292
|
-
- `../speccrew-knowledge-techs-generate/templates/CONVENTIONS-BUILD-TEMPLATE.md` → `{output_path}/conventions-build.md`
|
|
293
|
-
- `../speccrew-knowledge-techs-generate/templates/CONVENTIONS-DATA-TEMPLATE.md` → `{output_path}/conventions-data.md` (if applicable)
|
|
294
|
-
|
|
295
|
-
**Step 4.2: Fill Template Sections with search_replace**
|
|
296
|
-
- Use `search_replace` tool to fill each section of the template
|
|
297
|
-
- Replace placeholder content with actual analyzed data
|
|
298
|
-
- Follow [Document Structure Standard](#document-structure-standard)
|
|
299
|
-
- Apply [Source Traceability Requirements](#source-traceability-requirements)
|
|
300
|
-
|
|
301
|
-
**MANDATORY RULES**:
|
|
302
|
-
- **Do NOT use create_file to rewrite the entire document**
|
|
303
|
-
- **Do NOT delete or skip any template section**
|
|
304
|
-
- Only replace the placeholder content within each section
|
|
305
|
-
- Preserve all template section headers and structure
|
|
306
|
-
|
|
307
|
-
2. **Document Generation Order**:
|
|
308
|
-
- Generate: INDEX.md, tech-stack.md, architecture.md, conventions-design.md, conventions-dev.md, conventions-unit-test.md, conventions-system-test.md, conventions-build.md, conventions-data.md (if applicable)
|
|
309
|
-
|
|
310
|
-
3. **UI Design Conventions Reference in conventions-design.md**:
|
|
311
|
-
In conventions-design.md, ALWAYS include UI reference section:
|
|
312
|
-
```markdown
|
|
313
|
-
## UI Design Conventions
|
|
314
|
-
|
|
315
|
-
Refer to [UI Style Guide](ui-style/ui-style-guide.md) for design system details.
|
|
316
|
-
Note: UI style documents are generated by the separate ui-style worker.
|
|
317
|
-
```
|
|
318
|
-
|
|
319
|
-
### Step 5: Write Output Files
|
|
320
|
-
|
|
321
|
-
Create output directory if not exists, then write all generated documents.
|
|
322
|
-
|
|
323
|
-
### Step 6: Generate Analysis Coverage Report (MANDATORY)
|
|
324
|
-
|
|
325
|
-
After completing all document generation, you MUST create an analysis coverage report as a JSON file.
|
|
326
|
-
|
|
327
|
-
**Output file**: `{completed_dir}/{platform_id}.analysis-conventions.json`
|
|
328
|
-
|
|
329
|
-
Where `{completed_dir}` is the directory passed via the `completed_dir` parameter (if provided). If `completed_dir` is not provided, output to the platform's knowledges directory.
|
|
330
|
-
|
|
331
|
-
**Report Format**:
|
|
332
|
-
|
|
333
|
-
```json
|
|
334
|
-
{
|
|
335
|
-
"platform_id": "{platform_id}",
|
|
336
|
-
"platform_type": "{platform_type}",
|
|
337
|
-
"worker_type": "conventions",
|
|
338
|
-
"analyzed_at": "{ISO 8601 timestamp}",
|
|
339
|
-
"topics": {
|
|
340
|
-
"i18n": {
|
|
341
|
-
"status": "found",
|
|
342
|
-
"files_analyzed": ["src/i18n/index.ts", "locales/zh-CN.ts"],
|
|
343
|
-
"notes": "Vue I18n with 2 locale files"
|
|
344
|
-
},
|
|
345
|
-
"authorization": {
|
|
346
|
-
"status": "found",
|
|
347
|
-
"files_analyzed": ["src/permission/index.ts", "src/router/guard.ts"],
|
|
348
|
-
"notes": "RBAC with route guards and v-hasPermi directive"
|
|
349
|
-
},
|
|
350
|
-
"data_dictionary": {
|
|
351
|
-
"status": "not_found",
|
|
352
|
-
"files_analyzed": [],
|
|
353
|
-
"notes": "No dictionary implementation found in suggested paths"
|
|
354
|
-
}
|
|
355
|
-
},
|
|
356
|
-
"config_files_analyzed": [
|
|
357
|
-
"package.json",
|
|
358
|
-
"vite.config.ts",
|
|
359
|
-
"tsconfig.json"
|
|
360
|
-
],
|
|
361
|
-
"source_dirs_scanned": [
|
|
362
|
-
"src/components/",
|
|
363
|
-
"src/views/",
|
|
364
|
-
"src/utils/",
|
|
365
|
-
"src/store/"
|
|
366
|
-
],
|
|
367
|
-
"documents_generated": [
|
|
368
|
-
"INDEX.md",
|
|
369
|
-
"tech-stack.md",
|
|
370
|
-
"architecture.md",
|
|
371
|
-
"conventions-dev.md",
|
|
372
|
-
"conventions-design.md",
|
|
373
|
-
"conventions-unit-test.md",
|
|
374
|
-
"conventions-build.md"
|
|
375
|
-
],
|
|
376
|
-
"coverage_summary": {
|
|
377
|
-
"topics_found": 7,
|
|
378
|
-
"topics_partial": 1,
|
|
379
|
-
"topics_not_found": 1,
|
|
380
|
-
"topics_total": 9,
|
|
381
|
-
"coverage_percent": 78
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
```
|
|
385
|
-
|
|
386
|
-
**Rules**:
|
|
387
|
-
- Every topic from the Topic Checklist in Step 3 MUST appear in the `topics` object
|
|
388
|
-
- `files_analyzed` MUST list the actual file paths you read (relative to source_path)
|
|
389
|
-
- `status` MUST be one of: `found`, `not_found`, `partial`
|
|
390
|
-
- `coverage_percent` = (topics_found + topics_partial) / topics_total * 100, rounded to integer
|
|
391
|
-
- `documents_generated` MUST list all .md files actually created
|
|
392
|
-
- Use `create_file` to write this JSON file (this is the ONE exception where create_file is allowed — for JSON output files)
|
|
393
|
-
|
|
394
|
-
### Step 7: Report Results
|
|
395
|
-
|
|
396
|
-
```
|
|
397
|
-
Platform Convention Documents Generated: {{platform_id}}
|
|
398
|
-
- INDEX.md: ✓
|
|
399
|
-
- tech-stack.md: ✓
|
|
400
|
-
- architecture.md: ✓
|
|
401
|
-
- conventions-design.md: ✓
|
|
402
|
-
- conventions-dev.md: ✓
|
|
403
|
-
- conventions-unit-test.md: ✓
|
|
404
|
-
- conventions-system-test.md: ✓
|
|
405
|
-
- conventions-build.md: ✓
|
|
406
|
-
- conventions-data.md: ✓ (or skipped if not applicable)
|
|
407
|
-
- {{platform_id}}.analysis-conventions.json: ✓ (analysis coverage report)
|
|
408
|
-
- Output Directory: {{output_path}}
|
|
409
|
-
- Analysis Report: {{completed_dir}}/{{platform_id}}.analysis-conventions.json (or knowledges dir if completed_dir not provided)
|
|
410
|
-
```
|
|
411
|
-
|
|
412
|
-
**Completion Marker File**:
|
|
413
|
-
|
|
414
|
-
Create a done file to signal completion:
|
|
415
|
-
```json
|
|
416
|
-
{
|
|
417
|
-
"platform_id": "{platform_id}",
|
|
418
|
-
"worker_type": "conventions",
|
|
419
|
-
"status": "completed",
|
|
420
|
-
"documents_generated": ["INDEX.md", "tech-stack.md", "architecture.md", "conventions-design.md", "conventions-dev.md", "conventions-unit-test.md", "conventions-system-test.md", "conventions-build.md"],
|
|
421
|
-
"analysis_file": "{platform_id}.analysis-conventions.json",
|
|
422
|
-
"completed_at": "{ISO timestamp}"
|
|
423
|
-
}
|
|
424
|
-
```
|
|
425
|
-
|
|
426
|
-
---
|
|
427
|
-
|
|
428
|
-
## Reference Guides
|
|
429
|
-
|
|
430
|
-
### Document Structure Standard
|
|
431
|
-
|
|
432
|
-
All generated documents must follow this structure:
|
|
433
|
-
|
|
434
|
-
```markdown
|
|
435
|
-
# {{platform_name}} {{document_type}}
|
|
436
|
-
|
|
437
|
-
**Files Referenced in This Document**
|
|
438
|
-
|
|
439
|
-
{{source_files}}
|
|
440
|
-
|
|
441
|
-
> **Target Audience**: devcrew-designer-{{platform_id}}, devcrew-dev-{{platform_id}}, devcrew-test-{{platform_id}}
|
|
442
|
-
|
|
443
|
-
## Table of Contents
|
|
444
|
-
1. [Introduction](#introduction)
|
|
445
|
-
2. [Project Structure](#project-structure)
|
|
446
|
-
3. [Core Components](#core-components)
|
|
447
|
-
4. [Architecture Overview](#architecture-overview)
|
|
448
|
-
5. [Detailed Component Analysis](#detailed-component-analysis)
|
|
449
|
-
6. [Dependency Analysis](#dependency-analysis)
|
|
450
|
-
7. [Performance Considerations](#performance-considerations)
|
|
451
|
-
8. [Troubleshooting Guide](#troubleshooting-guide)
|
|
452
|
-
9. [Conclusion](#conclusion)
|
|
453
|
-
10. [Appendix](#appendix)
|
|
454
|
-
|
|
455
|
-
... content sections ...
|
|
456
|
-
|
|
457
|
-
**Section Source**
|
|
458
|
-
- [file.ext](../../../../path/to/file#Lstart-Lend)
|
|
459
|
-
```
|
|
460
|
-
|
|
461
|
-
### Source Traceability Requirements
|
|
462
|
-
|
|
463
|
-
**CRITICAL: All source file links MUST use RELATIVE PATHS. Absolute paths and `file://` protocol are STRICTLY FORBIDDEN.**
|
|
464
|
-
|
|
465
|
-
**FORBIDDEN:**
|
|
466
|
-
- Do NOT use absolute paths (e.g., `d:/dev/ruoyi-vue-pro/...`)
|
|
467
|
-
- Do NOT use `file://` protocol (e.g., `file://d:/dev/...`)
|
|
468
|
-
- Do NOT hardcode machine-specific paths
|
|
469
|
-
- ALWAYS use relative paths calculated from the document's location
|
|
470
|
-
|
|
471
|
-
**Dynamic Relative Path Calculation:**
|
|
73
|
+
## AgentFlow Definition
|
|
472
74
|
|
|
473
|
-
|
|
474
|
-
This is 4 levels deep from the project root:
|
|
475
|
-
- speccrew-workspace (1)
|
|
476
|
-
- knowledges (2)
|
|
477
|
-
- techs (3)
|
|
478
|
-
- {platform_id} (4)
|
|
75
|
+
<!-- @agentflow: workflow.agentflow.xml -->
|
|
479
76
|
|
|
480
|
-
|
|
77
|
+
> **REQUIRED**: Before executing this workflow, read the XML workflow specification: `speccrew-workspace/docs/rules/agentflow-spec.md`
|
|
481
78
|
|
|
482
|
-
Example calculation:
|
|
483
|
-
- Document: `speccrew-workspace/knowledges/techs/backend-spring/architecture.md`
|
|
484
|
-
- Source file: `yudao-server/src/main/java/.../YudaoServerApplication.java`
|
|
485
|
-
- Relative path: `../../../../yudao-server/src/main/java/.../YudaoServerApplication.java`
|
|
486
79
|
|
|
487
|
-
For root INDEX.md (one level less deep):
|
|
488
|
-
- Document: `speccrew-workspace/knowledges/techs/INDEX.md`
|
|
489
|
-
- Prefix: `../../../` (3 levels)
|
|
490
80
|
|
|
491
|
-
|
|
81
|
+
## Constraints
|
|
492
82
|
|
|
493
|
-
|
|
83
|
+
1. **DO NOT create temporary scripts, batch files, or workaround code files (`.py`, `.bat`, `.sh`, `.ps1`, etc.)** under any circumstances
|
|
84
|
+
2. **DO NOT analyze files outside the specified `${source_path}`**
|
|
85
|
+
3. **All content MUST be in the language specified by `${language}`**
|
|
86
|
+
4. **Use `search_replace` for section filling, NEVER rewrite entire document**
|
|
87
|
+
5. **Mermaid diagrams MUST follow the rules in `mermaid-rule.md`**
|
|
88
|
+
6. **All links MUST use relative paths, NEVER `file://` protocol**
|
|
89
|
+
7. **Write each document to file immediately after generation - DO NOT accumulate all documents in memory**
|
|
90
|
+
8. **DO NOT create done marker file until ALL required documents have been verified to exist on disk**
|
|
494
91
|
|
|
495
|
-
|
|
496
|
-
**Files Referenced in This Document**
|
|
497
|
-
|
|
498
|
-
| # | File | Source |
|
|
499
|
-
|---|------|--------|
|
|
500
|
-
| 1 | package.json | [View](../../../../yudao-ui/yudao-ui-admin-vue3/package.json) |
|
|
501
|
-
| 2 | tsconfig.json | [View](../../../../yudao-ui/yudao-ui-admin-vue3/tsconfig.json) |
|
|
502
|
-
```
|
|
503
|
-
|
|
504
|
-
> **Note**: Table format is used instead of list format because LLM-generated content may merge list items into a single line, breaking link rendering in VS Code preview.
|
|
505
|
-
|
|
506
|
-
**2. Diagram Source Annotation**
|
|
507
|
-
|
|
508
|
-
After each Mermaid diagram:
|
|
509
|
-
|
|
510
|
-
```markdown
|
|
511
|
-
**Diagram Source**
|
|
512
|
-
- [file-name.ext](../../../../yudao-server/src/main/java/...#L10-L50)
|
|
513
|
-
```
|
|
514
|
-
|
|
515
|
-
**3. Section Source Annotation**
|
|
516
|
-
|
|
517
|
-
At the end of each major section:
|
|
518
|
-
|
|
519
|
-
```markdown
|
|
520
|
-
**Section Source**
|
|
521
|
-
- [file-name.ext](../../../../yudao-server/src/main/java/...#L10-L50)
|
|
522
|
-
```
|
|
523
|
-
|
|
524
|
-
For generic guidance sections without specific file references:
|
|
525
|
-
|
|
526
|
-
```markdown
|
|
527
|
-
[This section provides general guidance, no specific file reference required]
|
|
528
|
-
```
|
|
529
|
-
|
|
530
|
-
### Mermaid Diagram Guide
|
|
531
|
-
|
|
532
|
-
When generating Mermaid diagrams, follow these compatibility guidelines:
|
|
533
|
-
|
|
534
|
-
**Key Requirements:**
|
|
535
|
-
- Use only basic node definitions: `A[text content]`
|
|
536
|
-
- No HTML tags (e.g., `<br/>`)
|
|
537
|
-
- No nested subgraphs
|
|
538
|
-
- No `direction` keyword
|
|
539
|
-
- No `style` definitions
|
|
540
|
-
- Use standard `graph TB/LR` syntax only
|
|
541
|
-
|
|
542
|
-
**Diagram Types:**
|
|
543
|
-
|
|
544
|
-
| Diagram Type | Use Case | Example Scenario |
|
|
545
|
-
|--------------|----------|------------------|
|
|
546
|
-
| `graph TB/LR` | Structure & Dependency | Module relationships, component hierarchy |
|
|
547
|
-
| `flowchart TD` | Business Logic Flow | Request processing, decision trees |
|
|
548
|
-
| `sequenceDiagram` | Interaction Flow | API calls, service communication |
|
|
549
|
-
| `classDiagram` | Class Structure | Entity relationships, inheritance |
|
|
550
|
-
| `erDiagram` | Database Schema | Table relationships, data model |
|
|
551
|
-
| `stateDiagram-v2` | State Machine | Order status, workflow states |
|
|
552
|
-
|
|
553
|
-
### Quality Requirements
|
|
554
|
-
|
|
555
|
-
#### Be Specific
|
|
556
|
-
|
|
557
|
-
Extract actual values from config files:
|
|
558
|
-
- ✓ "React 18.2.0" (from package.json)
|
|
559
|
-
- ✗ "React (version varies)"
|
|
560
|
-
|
|
561
|
-
#### Be Concise
|
|
562
|
-
|
|
563
|
-
Focus on actionable conventions:
|
|
564
|
-
- ✓ "Use PascalCase for component files: UserProfile.tsx"
|
|
565
|
-
- ✗ "There are many naming conventions to consider..."
|
|
566
|
-
|
|
567
|
-
#### Include Examples
|
|
568
|
-
|
|
569
|
-
Wherever possible, include concrete examples:
|
|
570
|
-
```markdown
|
|
571
|
-
### Component Naming
|
|
572
|
-
- ✓ UserProfile.tsx
|
|
573
|
-
- ✓ OrderList.tsx
|
|
574
|
-
- ✗ userProfile.tsx
|
|
575
|
-
- ✗ order-list.tsx
|
|
576
|
-
```
|
|
577
|
-
|
|
578
|
-
### Error Handling
|
|
579
|
-
|
|
580
|
-
**Template Not Found:**
|
|
581
|
-
- If a template file is missing, report error and skip that document
|
|
582
|
-
- Continue with other documents
|
|
583
|
-
|
|
584
|
-
**Configuration File Missing:**
|
|
585
|
-
- If expected config file not found, note in analysis report
|
|
586
|
-
- Use defaults or skip related sections
|
|
587
|
-
|
|
588
|
-
**Source Code Not Found:**
|
|
589
|
-
- If source directory structure doesn't match expectations
|
|
590
|
-
- Document actual structure found
|
|
591
|
-
- Mark topics as "not_found" in analysis report
|
|
92
|
+
## Task Completion Report
|
|
592
93
|
|
|
593
|
-
|
|
94
|
+
When the task is complete, report the following:
|
|
594
95
|
|
|
595
|
-
|
|
96
|
+
**Status:** `success` | `partial` | `failed`
|
|
596
97
|
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
{
|
|
601
|
-
|
|
602
|
-
"skill": "speccrew-knowledge-techs-generate-conventions",
|
|
603
|
-
"output_files": [
|
|
604
|
-
"{output_path}/INDEX.md",
|
|
605
|
-
"{output_path}/tech-stack.md",
|
|
606
|
-
"{output_path}/architecture.md",
|
|
607
|
-
"{output_path}/conventions-design.md",
|
|
608
|
-
"{output_path}/conventions-dev.md",
|
|
609
|
-
"{output_path}/conventions-unit-test.md",
|
|
610
|
-
"{output_path}/conventions-system-test.md",
|
|
611
|
-
"{output_path}/conventions-build.md",
|
|
612
|
-
"{output_path}/conventions-data.md",
|
|
613
|
-
"{completed_dir}/{platform_id}.analysis-conventions.json"
|
|
614
|
-
],
|
|
615
|
-
"summary": "Convention documents generated for {platform_id} with {coverage_percent}% topic coverage",
|
|
616
|
-
"metrics": {
|
|
617
|
-
"convention_categories": 0,
|
|
618
|
-
"rules_documented": 0,
|
|
619
|
-
"code_examples_included": 0
|
|
620
|
-
},
|
|
621
|
-
"errors": [],
|
|
622
|
-
"next_steps": [
|
|
623
|
-
"Run speccrew-knowledge-techs-generate-ui-style for frontend platforms",
|
|
624
|
-
"Review analysis-conventions.json for topic coverage gaps"
|
|
625
|
-
]
|
|
626
|
-
}
|
|
627
|
-
```
|
|
98
|
+
**Summary:**
|
|
99
|
+
- Platform: `${platform_id}`
|
|
100
|
+
- Type: `${platform_type}`
|
|
101
|
+
- Framework: `${framework}`
|
|
102
|
+
- Documents generated: 8 required + (1 optional if data layer detected)
|
|
628
103
|
|
|
629
|
-
|
|
104
|
+
**Files Generated:**
|
|
105
|
+
- `${output_path}/INDEX.md` - Platform technology index
|
|
106
|
+
- `${output_path}/tech-stack.md` - Technology stack details
|
|
107
|
+
- `${output_path}/architecture.md` - Architecture conventions
|
|
108
|
+
- `${output_path}/conventions-design.md` - Design conventions
|
|
109
|
+
- `${output_path}/conventions-dev.md` - Development conventions
|
|
110
|
+
- `${output_path}/conventions-unit-test.md` - Unit testing conventions
|
|
111
|
+
- `${output_path}/conventions-system-test.md` - System testing conventions
|
|
112
|
+
- `${output_path}/conventions-build.md` - Build and deployment conventions
|
|
113
|
+
- `${output_path}/conventions-data.md` - Data conventions (optional)
|
|
114
|
+
- `${completed_dir}/${platform_id}.analysis-conventions.json` - Analysis coverage report
|
|
630
115
|
|
|
631
116
|
## Checklist
|
|
632
117
|
|
|
633
118
|
### Pre-Generation
|
|
119
|
+
- [ ] All template files read successfully
|
|
634
120
|
- [ ] All configuration files read and parsed
|
|
635
121
|
- [ ] Technology stack extracted accurately
|
|
636
122
|
- [ ] Conventions analyzed from config files
|
|
637
123
|
|
|
638
|
-
### Document Generation
|
|
639
|
-
- [ ] Platform type identified (web/mobile/backend/desktop/api)
|
|
640
|
-
- [ ] Data layer detection completed for non-backend platforms
|
|
641
|
-
- [ ] Decision made on whether to generate conventions-data.md
|
|
642
|
-
- [ ] Backend platform → Always generate
|
|
643
|
-
- [ ] Other platforms → Generate only if data layer detected
|
|
644
|
-
|
|
645
|
-
### Required Documents (All Platforms)
|
|
124
|
+
### Document Generation
|
|
646
125
|
- [ ] INDEX.md generated with navigation
|
|
647
126
|
- [ ] tech-stack.md generated with dependency tables
|
|
648
127
|
- [ ] architecture.md generated with platform-specific patterns
|
|
@@ -651,8 +130,6 @@ Upon completion, output the following structured report:
|
|
|
651
130
|
- [ ] conventions-unit-test.md generated with unit testing requirements
|
|
652
131
|
- [ ] conventions-system-test.md generated with system testing requirements
|
|
653
132
|
- [ ] conventions-build.md generated with build and deployment conventions
|
|
654
|
-
|
|
655
|
-
### Optional Document
|
|
656
133
|
- [ ] conventions-data.md generated (only if applicable per platform type mapping)
|
|
657
134
|
|
|
658
135
|
### Quality Checks
|
|
@@ -661,6 +138,17 @@ Upon completion, output the following structured report:
|
|
|
661
138
|
- [ ] **Source traceability**: Diagram Source annotations added after each Mermaid diagram
|
|
662
139
|
- [ ] **Source traceability**: Section Source annotations added at end of major sections
|
|
663
140
|
- [ ] **Mermaid compatibility**: No `style`, `direction`, `<br/>`, or nested subgraphs
|
|
664
|
-
- [ ] **Document completeness**:
|
|
665
|
-
- [ ] **
|
|
666
|
-
- [ ]
|
|
141
|
+
- [ ] **Document completeness**: All 8 required documents exist (verified in Step 3)
|
|
142
|
+
- [ ] **Done marker integrity**: Done marker only created after verification
|
|
143
|
+
- [ ] **Analysis Coverage Report**: `${platform_id}.analysis-conventions.json` generated
|
|
144
|
+
|
|
145
|
+
## CONTINUOUS EXECUTION RULES
|
|
146
|
+
|
|
147
|
+
This skill MUST execute continuously without user interruption:
|
|
148
|
+
|
|
149
|
+
1. **All steps must complete in a single session** - from template reading to done marker creation
|
|
150
|
+
2. **If context window is running low**: Save checkpoint and inform user - DO NOT create false done marker
|
|
151
|
+
3. **No intermediate user confirmation required** between steps
|
|
152
|
+
4. **Error handling**: On error, log details and stop - do not proceed with incomplete data
|
|
153
|
+
5. **Verification gate**: Step 3 verification MUST pass before Step 4 done marker creation
|
|
154
|
+
6. **Memory management**: Write each document immediately after generation, do not accumulate in memory
|