speccrew 0.7.74 → 0.7.76
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-feature-designer.md +4 -647
- package/.speccrew/agents/speccrew-product-manager.md +5 -480
- package/.speccrew/agents/speccrew-system-deployer.md +6 -457
- package/.speccrew/agents/speccrew-system-developer.md +9 -913
- package/.speccrew/agents/speccrew-test-manager.md +403 -1112
- package/.speccrew/skills/speccrew-agentflow-manager/SKILL.md +6 -149
- package/.speccrew/skills/speccrew-deploy-build/SKILL.md +2 -59
- package/.speccrew/skills/speccrew-deploy-migrate/SKILL.md +2 -64
- package/.speccrew/skills/speccrew-deploy-smoke-test/SKILL.md +2 -75
- package/.speccrew/skills/speccrew-deploy-startup/SKILL.md +2 -70
- package/.speccrew/skills/speccrew-dev-backend/SKILL.md +2 -381
- package/.speccrew/skills/speccrew-dev-desktop-electron/SKILL.md +2 -369
- package/.speccrew/skills/speccrew-dev-desktop-tauri/SKILL.md +2 -362
- package/.speccrew/skills/speccrew-dev-frontend/SKILL.md +2 -304
- package/.speccrew/skills/speccrew-dev-mobile/SKILL.md +2 -294
- package/.speccrew/skills/speccrew-dev-review-backend/SKILL.md +2 -204
- package/.speccrew/skills/speccrew-dev-review-desktop/SKILL.md +2 -173
- package/.speccrew/skills/speccrew-dev-review-frontend/SKILL.md +2 -169
- package/.speccrew/skills/speccrew-dev-review-mobile/SKILL.md +2 -173
- package/.speccrew/skills/speccrew-fd-api-contract/SKILL.md +2 -251
- package/.speccrew/skills/speccrew-fd-feature-analyze/SKILL.md +2 -254
- package/.speccrew/skills/speccrew-fd-feature-design/SKILL.md +2 -748
- package/.speccrew/skills/speccrew-feature-designer-orchestration/SKILL.md +6 -105
- package/.speccrew/skills/speccrew-get-timestamp/SKILL.md +6 -33
- package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/SKILL.md +3 -138
- package/.speccrew/skills/speccrew-knowledge-bizs-api-graph/SKILL.md +3 -283
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/SKILL.md +3 -1014
- package/.speccrew/skills/speccrew-knowledge-bizs-identify-entries/SKILL.md +4 -343
- package/.speccrew/skills/speccrew-knowledge-bizs-init-features/SKILL.md +4 -235
- package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/SKILL.md +6 -72
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/SKILL.md +3 -534
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-graph/SKILL.md +3 -432
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-style-extract/SKILL.md +4 -391
- package/.speccrew/skills/speccrew-knowledge-graph-query/SKILL.md +3 -98
- package/.speccrew/skills/speccrew-knowledge-graph-write/SKILL.md +3 -92
- package/.speccrew/skills/speccrew-knowledge-module-summarize/SKILL.md +3 -181
- package/.speccrew/skills/speccrew-knowledge-system-summarize/SKILL.md +3 -148
- package/.speccrew/skills/speccrew-knowledge-techs-dispatch/SKILL.md +3 -330
- package/.speccrew/skills/speccrew-knowledge-techs-generate/SKILL.md +6 -159
- package/.speccrew/skills/speccrew-knowledge-techs-generate-conventions/SKILL.md +3 -142
- package/.speccrew/skills/speccrew-knowledge-techs-generate-quality/SKILL.md +3 -568
- package/.speccrew/skills/speccrew-knowledge-techs-generate-ui-style/SKILL.md +3 -180
- package/.speccrew/skills/speccrew-knowledge-techs-index/SKILL.md +3 -154
- package/.speccrew/skills/speccrew-knowledge-techs-init/SKILL.md +3 -176
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/SKILL.md +3 -135
- package/.speccrew/skills/speccrew-pm-knowledge-detector/SKILL.md +4 -88
- package/.speccrew/skills/speccrew-pm-module-initializer/SKILL.md +4 -178
- package/.speccrew/skills/speccrew-pm-module-matcher/SKILL.md +3 -102
- package/.speccrew/skills/speccrew-pm-phase0-init/SKILL.md +5 -78
- package/.speccrew/skills/speccrew-pm-phase1-knowledge-check/SKILL.md +5 -85
- package/.speccrew/skills/speccrew-pm-phase2-complexity-assess/SKILL.md +4 -100
- package/.speccrew/skills/speccrew-pm-phase5-subprd-dispatch/SKILL.md +14 -106
- package/.speccrew/skills/speccrew-pm-phase6-verify-confirm/SKILL.md +7 -84
- package/.speccrew/skills/speccrew-pm-requirement-analysis/SKILL.md +6 -66
- package/.speccrew/skills/speccrew-pm-requirement-assess/SKILL.md +4 -96
- package/.speccrew/skills/speccrew-pm-requirement-clarify/SKILL.md +4 -131
- package/.speccrew/skills/speccrew-pm-requirement-model/SKILL.md +6 -79
- package/.speccrew/skills/speccrew-pm-requirement-simple/SKILL.md +4 -76
- package/.speccrew/skills/speccrew-pm-sub-prd-generate/SKILL.md +3 -281
- package/.speccrew/skills/speccrew-product-manager-orchestration/SKILL.md +6 -165
- package/.speccrew/skills/speccrew-system-deployer-orchestration/SKILL.md +6 -79
- package/.speccrew/skills/speccrew-system-designer-orchestration/SKILL.md +2 -35
- package/.speccrew/skills/speccrew-system-developer-orchestration/SKILL.md +6 -98
- package/.speccrew/skills/speccrew-task-worker-execution/SKILL.md +6 -94
- package/.speccrew/skills/speccrew-team-leader-routing/SKILL.md +6 -79
- package/.speccrew/skills/speccrew-test-case-design/SKILL.md +2 -58
- package/.speccrew/skills/speccrew-test-code-gen/SKILL.md +2 -61
- package/.speccrew/skills/speccrew-test-manager-orchestration/SKILL.md +6 -94
- package/.speccrew/skills/speccrew-test-reporter/SKILL.md +2 -102
- package/.speccrew/skills/speccrew-test-runner/SKILL.md +3 -121
- package/package.json +1 -1
|
@@ -4,339 +4,12 @@ description: Dispatch techs knowledge base generation tasks with 3-stage pipelin
|
|
|
4
4
|
tools: Read, Write, Task, Bash
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
>
|
|
9
|
-
> **Step 1**: Load XML workflow specification: `speccrew-workspace/docs/rules/agentflow-spec.md` — this defines all block types and action-to-tool mappings
|
|
10
|
-
>
|
|
11
|
-
> **Step 2**: Execute this SKILL.md's XML workflow **block by block in document order**. For EVERY block, you MUST follow this 3-step cycle:
|
|
12
|
-
>
|
|
13
|
-
> ```
|
|
14
|
-
> 🏷️ Block [ID] (action=[action]) — [desc]
|
|
15
|
-
> 🔧 Tool: [which IDE tool to call]
|
|
16
|
-
> ✅ Result: [output or status]
|
|
17
|
-
> ```
|
|
18
|
-
>
|
|
19
|
-
> Action-to-tool mapping:
|
|
20
|
-
> - `action="run-script"` → Execute via **Terminal tool** (pass the `<field name="command">` value EXACTLY)
|
|
21
|
-
> - `action="run-skill"` → Invoke via **Skill tool** (pass the `<field name="skill">` value EXACTLY)
|
|
22
|
-
> - `action="dispatch-to-worker"` → Create **Task** via **Task tool** for `speccrew-task-worker` (Worker loads and executes the skill, NOT you)
|
|
23
|
-
> - `action="confirm"` (event) → Present to user and wait for response
|
|
24
|
-
>
|
|
25
|
-
> **Step 3**: Execute ALL stages sequentially without pausing (only stop at explicit `<event action="confirm">` blocks)
|
|
26
|
-
>
|
|
27
|
-
> **FORBIDDEN**:
|
|
28
|
-
> - Do NOT skip the block announcement format above — every block must be announced before execution
|
|
29
|
-
> - Do NOT run terminal commands as substitute for Skill tool calls
|
|
30
|
-
> - Do NOT do Worker's job yourself — when `action="dispatch-to-worker"`, create a Task and let Worker handle it
|
|
31
|
-
> - Do NOT skip blocks or improvise your own commands
|
|
32
|
-
> - Do NOT read a skill's SKILL.md file yourself — use the Skill tool which resolves paths automatically
|
|
33
|
-
|
|
34
|
-
# Techs Knowledge Dispatch (XML Block Version)
|
|
35
|
-
|
|
36
|
-
Orchestrate **techs knowledge base generation** with a 3-stage pipeline using **XML Block system**: Platform Detection → Tech Doc Generation → Root Index.
|
|
37
|
-
|
|
38
|
-
## Invocation Method
|
|
39
|
-
|
|
40
|
-
**CRITICAL**: This skill is an **orchestration playbook** — it MUST be loaded directly by Team Leader via Skill tool (NOT via Worker Agent).
|
|
41
|
-
|
|
42
|
-
```
|
|
43
|
-
Correct: Leader uses Skill tool to load this playbook directly
|
|
44
|
-
Incorrect: Dispatch this skill to speccrew-task-worker
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
**Why?** This skill defines the orchestration workflow and prepares task plans for downstream workers. The Team Leader reads this playbook and dispatches individual worker tasks via Task tool → speccrew-task-worker for each stage.
|
|
48
|
-
|
|
49
|
-
**Correct Invocation Pattern**:
|
|
50
|
-
```xml
|
|
51
|
-
<block type="task" action="run-skill" desc="Leader directly invokes techs-dispatch as orchestration playbook">
|
|
52
|
-
<field name="skill">speccrew-knowledge-techs-dispatch</field>
|
|
53
|
-
<field name="note">Leader directly calls this dispatch skill as an orchestration playbook. The dispatch skill defines the workflow; Leader dispatches downstream workers via Task tool → speccrew-task-worker for each stage.</field>
|
|
54
|
-
</block>
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
**Worker Dispatch Rule**:
|
|
58
|
-
- Dispatch skills (bizs-dispatch, techs-dispatch): Leader calls directly via Skill tool
|
|
59
|
-
- Downstream worker skills (techs-init, techs-generate-conventions, techs-generate-ui-style, etc.): Leader dispatches via Task tool → speccrew-task-worker
|
|
60
|
-
|
|
61
|
-
**FORBIDDEN**: Worker Agents MUST NOT execute this dispatch skill. If a Worker Agent loads this skill, it must report error and abort.
|
|
62
|
-
|
|
63
|
-
## Quick Reference — Execution Flow
|
|
64
|
-
|
|
65
|
-
```
|
|
66
|
-
Stage 1: Platform Detection
|
|
67
|
-
└─ Read techs-manifest.json → Identify platforms & tech stacks
|
|
68
|
-
↓
|
|
69
|
-
Stage 2: Tech Doc Generation (PARALLEL)
|
|
70
|
-
└─ Prepare task plans for techs-generate workers per platform
|
|
71
|
-
└─ After generate workers complete → prepare quality check worker task plans
|
|
72
|
-
└─ Monitor completion markers
|
|
73
|
-
↓
|
|
74
|
-
Stage 2.5: Completion Verification
|
|
75
|
-
└─ Step A: Scan completion markers
|
|
76
|
-
└─ Step B: Verify output integrity
|
|
77
|
-
└─ Step C: Update progress status
|
|
78
|
-
↓
|
|
79
|
-
Stage 3: Root Index Generation
|
|
80
|
-
└─ Generate techs/README.md root index
|
|
81
|
-
└─ Cross-platform consistency check
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
> **NOTE**: All worker dispatch operations are handled by the calling Agent (Team Leader). This Skill only prepares task plans and monitors completion markers.
|
|
85
|
-
|
|
86
|
-
## Language Adaptation
|
|
87
|
-
|
|
88
|
-
**CRITICAL**: All generated documents must match the user's language. Detect the language from the user's input and pass it to all downstream Worker Agents.
|
|
89
|
-
|
|
90
|
-
- User writes in 中文 → Generate Chinese documents, pass `language: "zh"` to workers
|
|
91
|
-
- User writes in English → Generate English documents, pass `language: "en"` to workers
|
|
92
|
-
- User writes in other languages → Use appropriate language code
|
|
93
|
-
|
|
94
|
-
**All downstream skills must receive the `language` parameter and generate content in that language only.**
|
|
95
|
-
|
|
96
|
-
## Trigger Scenarios
|
|
97
|
-
|
|
7
|
+
# Trigger Scenarios
|
|
98
8
|
- "Initialize techs knowledge base"
|
|
99
9
|
- "Generate technology knowledge from source code"
|
|
100
10
|
- "Dispatch techs knowledge generation"
|
|
101
11
|
|
|
102
|
-
## User
|
|
103
|
-
|
|
104
|
-
Leader Agent (speccrew-team-leader)
|
|
105
|
-
|
|
106
|
-
## Platform Naming Convention
|
|
107
|
-
|
|
108
|
-
Read `speccrew-workspace/docs/configs/platform-mapping.json` for standardized platform mapping rules.
|
|
109
|
-
|
|
110
|
-
| Concept | techs-init (techs-manifest.json) | Example (UniApp) |
|
|
111
|
-
|---------|----------------------------------|------------------|
|
|
112
|
-
| **Category** | `platform_type` | `mobile` |
|
|
113
|
-
| **Technology** | `framework` | `uniapp` |
|
|
114
|
-
| **Identifier** | `platform_id` | `mobile-uniapp` |
|
|
115
|
-
|
|
116
|
-
## Input
|
|
117
|
-
|
|
118
|
-
| Variable | Description | Default |
|
|
119
|
-
|----------|-------------|---------|
|
|
120
|
-
| `source_path` | Source code root path | project root |
|
|
121
|
-
| `language` | User's language code (e.g., "zh", "en") | **REQUIRED** |
|
|
122
|
-
|
|
123
|
-
## Output
|
|
124
|
-
|
|
125
|
-
- Platform manifest: `speccrew-workspace/knowledges/base/sync-state/knowledge-techs/techs-manifest.json`
|
|
126
|
-
- Tech docs: `speccrew-workspace/knowledges/techs/{platform_id}/`
|
|
127
|
-
- Root index: `speccrew-workspace/knowledges/techs/INDEX.md`
|
|
128
|
-
- Status files: `speccrew-workspace/knowledges/base/sync-state/knowledge-techs/stage{N}-status.json`
|
|
129
|
-
|
|
130
|
-
---
|
|
131
|
-
|
|
132
12
|
## AgentFlow Definition
|
|
133
|
-
|
|
134
13
|
<!-- @agentflow: SKILL.xml -->
|
|
135
|
-
|
|
136
|
-
>
|
|
137
|
-
>
|
|
138
|
-
> After reading the specification, parse the XML workflow below and **strictly execute each `<block>` in document order**. Every `<block type="task">` is a literal tool-call instruction — use the `action` attribute to determine which IDE tool to invoke, and pass the `<field name="command">` or `<field name="skill">` value **exactly as written**. Do NOT interpret the workflow as a goal description or improvise your own approach.
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
---
|
|
143
|
-
|
|
144
|
-
## Appendix: Reference
|
|
145
|
-
|
|
146
|
-
### Worker Completion Marker Format
|
|
147
|
-
|
|
148
|
-
Each Worker MUST create a completion marker file after generating documents.
|
|
149
|
-
|
|
150
|
-
#### Conventions Worker Done File
|
|
151
|
-
|
|
152
|
-
**File**: `{completed_dir}/{platform_id}.done-conventions.json`
|
|
153
|
-
|
|
154
|
-
**Format**:
|
|
155
|
-
```json
|
|
156
|
-
{
|
|
157
|
-
"platform_id": "web-vue",
|
|
158
|
-
"worker_type": "conventions",
|
|
159
|
-
"status": "completed",
|
|
160
|
-
"documents_generated": [
|
|
161
|
-
"INDEX.md", "tech-stack.md", "architecture.md",
|
|
162
|
-
"conventions-dev.md", "conventions-design.md",
|
|
163
|
-
"conventions-unit-test.md", "conventions-build.md"
|
|
164
|
-
],
|
|
165
|
-
"analysis_file": "web-vue.analysis-conventions.json",
|
|
166
|
-
"completed_at": "2024-01-15T10:45:00Z"
|
|
167
|
-
}
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
#### UI-Style Worker Done File
|
|
171
|
-
|
|
172
|
-
**File**: `{completed_dir}/{platform_id}.done-ui-style.json`
|
|
173
|
-
|
|
174
|
-
**Format**:
|
|
175
|
-
```json
|
|
176
|
-
{
|
|
177
|
-
"platform_id": "web-vue",
|
|
178
|
-
"worker_type": "ui-style",
|
|
179
|
-
"status": "completed",
|
|
180
|
-
"ui_analysis_level": "full",
|
|
181
|
-
"documents_generated": [
|
|
182
|
-
"ui-style/ui-style-guide.md"
|
|
183
|
-
],
|
|
184
|
-
"analysis_file": "web-vue.analysis-ui-style.json",
|
|
185
|
-
"completed_at": "2024-01-15T10:45:00Z"
|
|
186
|
-
}
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
**Status values**:
|
|
190
|
-
- `completed` — All required documents generated successfully
|
|
191
|
-
- `failed` — Critical failure, required documents not generated
|
|
192
|
-
|
|
193
|
-
If a Worker encounters a fatal error, it should still attempt to create the done file with `status: "failed"` and include error details in an `"error"` field.
|
|
194
|
-
|
|
195
|
-
#### Quality Worker Done File
|
|
196
|
-
|
|
197
|
-
**File**: `{completed_dir}/{platform_id}.quality-done.json`
|
|
198
|
-
|
|
199
|
-
**Format**:
|
|
200
|
-
```json
|
|
201
|
-
{
|
|
202
|
-
"platform_id": "web-vue",
|
|
203
|
-
"worker_type": "quality",
|
|
204
|
-
"status": "completed",
|
|
205
|
-
"quality_score": 85,
|
|
206
|
-
"issues_found": 2,
|
|
207
|
-
"completed_at": "2024-01-15T11:00:00Z"
|
|
208
|
-
}
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
---
|
|
212
|
-
|
|
213
|
-
### Platform Status Tracking Fields
|
|
214
|
-
|
|
215
|
-
Each platform entry in techs-manifest.json includes status tracking fields for monitoring the analysis pipeline progress:
|
|
216
|
-
|
|
217
|
-
| Field | Type | Values | Description |
|
|
218
|
-
|-------|------|--------|-------------|
|
|
219
|
-
| `status` | string | `pending` / `processing` / `completed` / `partial` / `failed` | Current analysis status |
|
|
220
|
-
| `startedAt` | string \| null | ISO 8601 timestamp | When the Worker started analyzing this platform |
|
|
221
|
-
| `completedAt` | string \| null | ISO 8601 timestamp | When the Worker finished analyzing this platform |
|
|
222
|
-
| `analysisLevel` | string \| null | `full` / `minimal` / `reference_only` | Depth of analysis achieved |
|
|
223
|
-
| `topicsCoverage` | number \| null | 0-100 | Percentage of domain topics covered (from analysis.json) |
|
|
224
|
-
| `workers` | object | See below | Per-worker status tracking |
|
|
225
|
-
|
|
226
|
-
**Workers Object Structure:**
|
|
227
|
-
```json
|
|
228
|
-
{
|
|
229
|
-
"platform_id": "web-vue",
|
|
230
|
-
"status": "completed",
|
|
231
|
-
"workers": {
|
|
232
|
-
"conventions": {
|
|
233
|
-
"status": "completed",
|
|
234
|
-
"skill": "speccrew-knowledge-techs-generate-conventions",
|
|
235
|
-
"done_file": "web-vue.done-conventions.json"
|
|
236
|
-
},
|
|
237
|
-
"ui_style": {
|
|
238
|
-
"status": "completed",
|
|
239
|
-
"skill": "speccrew-knowledge-techs-generate-ui-style",
|
|
240
|
-
"done_file": "web-vue.done-ui-style.json"
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
```
|
|
245
|
-
|
|
246
|
-
For backend platforms, `ui_style.status` is set to `"skipped"`.
|
|
247
|
-
|
|
248
|
-
**Status Lifecycle:**
|
|
249
|
-
```
|
|
250
|
-
pending → processing → completed
|
|
251
|
-
→ partial (conventions OK, ui-style failed)
|
|
252
|
-
→ failed
|
|
253
|
-
```
|
|
254
|
-
|
|
255
|
-
---
|
|
256
|
-
|
|
257
|
-
### Output per Platform
|
|
258
|
-
|
|
259
|
-
```
|
|
260
|
-
speccrew-workspace/knowledges/techs/{platform_id}/
|
|
261
|
-
├── INDEX.md # Required
|
|
262
|
-
├── tech-stack.md # Required
|
|
263
|
-
├── architecture.md # Required
|
|
264
|
-
├── conventions-design.md # Required
|
|
265
|
-
├── conventions-dev.md # Required
|
|
266
|
-
├── conventions-unit-test.md # Required
|
|
267
|
-
├── conventions-system-test.md # Required
|
|
268
|
-
├── conventions-build.md # Required
|
|
269
|
-
├── conventions-data.md # Optional — platform-specific
|
|
270
|
-
└── ui-style/ # Optional — frontend only (web/mobile/desktop)
|
|
271
|
-
├── ui-style-guide.md # Generated by techs Stage 2
|
|
272
|
-
├── page-types/ # Populated by bizs pipeline Stage 3.5 (ui-style-extract)
|
|
273
|
-
├── components/ # Populated by bizs pipeline Stage 3.5 (ui-style-extract)
|
|
274
|
-
├── layouts/ # Populated by bizs pipeline Stage 3.5 (ui-style-extract)
|
|
275
|
-
└── styles/ # Generated by techs Stage 2
|
|
276
|
-
```
|
|
277
|
-
|
|
278
|
-
**Cross-Pipeline Note for `ui-style/`**:
|
|
279
|
-
- `ui-style-guide.md` and `styles/` are generated by techs pipeline Stage 2 (technical framework-level style specs)
|
|
280
|
-
- `page-types/`, `components/`, and `layouts/` are populated by bizs pipeline Stage 3.5 (`speccrew-knowledge-bizs-ui-style-extract` skill), which aggregates patterns from analyzed feature documents
|
|
281
|
-
- These two sources are complementary: techs provides framework-level conventions, bizs adds real-page-derived design patterns
|
|
282
|
-
- If bizs pipeline has not been executed, these three subdirectories will be empty
|
|
283
|
-
|
|
284
|
-
**Optional file `conventions-data.md` rules**:
|
|
285
|
-
|
|
286
|
-
| Platform Type | Required? | Notes |
|
|
287
|
-
|----------|-----------|-------|
|
|
288
|
-
| `backend` | Required | ORM specs, data modeling, caching |
|
|
289
|
-
| `web` | Depends | Only if using ORM/data layer (Prisma, TypeORM, etc.) |
|
|
290
|
-
| `mobile` | Optional | Based on tech stack |
|
|
291
|
-
| `desktop` | Optional | Based on tech stack |
|
|
292
|
-
|
|
293
|
-
---
|
|
294
|
-
|
|
295
|
-
### Error Handling
|
|
296
|
-
|
|
297
|
-
#### Error Handling Strategy
|
|
298
|
-
|
|
299
|
-
```
|
|
300
|
-
ON Worker Failure:
|
|
301
|
-
1. Capture error message from worker_result.error
|
|
302
|
-
2. Mark platform status as "failed" in stage2-status.json
|
|
303
|
-
3. Record failed platform_id and error details
|
|
304
|
-
4. Continue processing other platforms (no retry, fail fast)
|
|
305
|
-
5. After all workers complete, evaluate overall status:
|
|
306
|
-
- IF all platforms failed → ABORT pipeline
|
|
307
|
-
- IF some platforms succeeded → CONTINUE to Stage 3 with successful platforms only
|
|
308
|
-
```
|
|
309
|
-
|
|
310
|
-
#### Stage-Level Failure Handling
|
|
311
|
-
|
|
312
|
-
| Stage | Failure Handling |
|
|
313
|
-
|-------|-----------------|
|
|
314
|
-
| Stage 1 | Abort pipeline, report error |
|
|
315
|
-
| Stage 2 | Continue with successful platforms, report failed ones |
|
|
316
|
-
| Stage 2.5 | Continue pipeline, report warnings |
|
|
317
|
-
| Stage 3 | Abort if Stage 2 had critical failures |
|
|
318
|
-
|
|
319
|
-
#### Worker Failure Details
|
|
320
|
-
|
|
321
|
-
**When a Worker Agent fails:**
|
|
322
|
-
- **No automatic retry**: Worker failures are recorded as-is
|
|
323
|
-
- **Partial success accepted**: Pipeline continues if at least one platform succeeds
|
|
324
|
-
- **Error propagation**: Failed platform details are included in stage2-status.json
|
|
325
|
-
- **Stage 3 decision**: Only platforms with status "complete" are included in root INDEX.md
|
|
326
|
-
|
|
327
|
-
---
|
|
328
|
-
|
|
329
|
-
### Checklist
|
|
330
|
-
|
|
331
|
-
- [ ] Stage 1: Platform manifest generated with techs-manifest.json
|
|
332
|
-
- [ ] Stage 2: All platforms processed in parallel
|
|
333
|
-
- [ ] Stage 2: `stage2-status.json` generated with all platform results
|
|
334
|
-
- [ ] Stage 3: Root INDEX.md generated with Agent mapping
|
|
335
|
-
- [ ] Stage 3: `stage3-status.json` generated with index info
|
|
336
|
-
|
|
337
|
-
#### Document Completeness Verification
|
|
338
|
-
- [ ] Each platform directory contains required documents: INDEX.md, tech-stack.md, architecture.md, conventions-design.md, conventions-dev.md, conventions-unit-test.md, conventions-system-test.md, conventions-build.md
|
|
339
|
-
- [ ] `conventions-data.md` exists only for appropriate platforms (backend required, others optional)
|
|
340
|
-
- [ ] All documents include file reference blocks (pure Markdown format for VS Code preview compatibility)
|
|
341
|
-
- [ ] All documents include AI-TAG and AI-CONTEXT comments
|
|
342
|
-
- [ ] techs/INDEX.md links only to existing documents
|
|
14
|
+
> **REQUIRED**: Before executing this workflow, read the XML workflow specification: speccrew-workspace/docs/rules/agentflow-spec.md
|
|
15
|
+
> Then read and execute the XML workflow in SKILL.xml block-by-block as the authoritative execution plan.
|
|
@@ -4,165 +4,12 @@ description: Stage 2 of technology knowledge initialization - Generate technolog
|
|
|
4
4
|
tools: Read, Write, Glob, Grep, Skill
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
# Stage 2: Generate Platform Technology Documents (XML Workflow)
|
|
12
|
-
|
|
13
|
-
Generate comprehensive technology documentation for a specific platform by analyzing its configuration files and source code structure.
|
|
14
|
-
|
|
15
|
-
## Language Adaptation
|
|
16
|
-
|
|
17
|
-
**CRITICAL**: Generate all content in the language specified by the `language` parameter.
|
|
18
|
-
|
|
19
|
-
## Input
|
|
20
|
-
|
|
21
|
-
- `platform_id`: Platform identifier (e.g., "web-react", "backend-nestjs")
|
|
22
|
-
- `platform_type`: Platform type (web, mobile, backend, desktop)
|
|
23
|
-
- `framework`: Primary framework (react, nestjs, flutter, etc.)
|
|
24
|
-
- `source_path`: Platform source directory
|
|
25
|
-
- `config_files`: List of configuration file paths
|
|
26
|
-
- `convention_files`: List of convention file paths (eslint, prettier, etc.)
|
|
27
|
-
- `output_path`: Output directory for generated documents
|
|
28
|
-
- `language`: Target language (e.g., "zh", "en") - **REQUIRED**
|
|
29
|
-
- `completed_dir`: (Optional) Directory for analysis coverage report output
|
|
30
|
-
|
|
31
|
-
## Output
|
|
32
|
-
|
|
33
|
-
**Required Documents (All Platforms)**: INDEX.md, tech-stack.md, architecture.md, conventions-design.md, conventions-dev.md, conventions-unit-test.md, conventions-system-test.md, conventions-build.md
|
|
34
|
-
|
|
35
|
-
**Optional Documents**: conventions-data.md (backend required), ui-style/ (frontend only)
|
|
36
|
-
|
|
37
|
-
**Quality Assurance**: After document generation, quality checks are performed by `speccrew-knowledge-techs-generate-quality` skill.
|
|
7
|
+
# Trigger Scenarios
|
|
8
|
+
- "Generate tech docs for {platform}"
|
|
9
|
+
- "Create technology documentation"
|
|
10
|
+
- "Extract tech stack and conventions"
|
|
38
11
|
|
|
39
12
|
## AgentFlow Definition
|
|
40
|
-
|
|
41
13
|
<!-- @agentflow: SKILL.xml -->
|
|
42
|
-
|
|
43
|
-
>
|
|
44
|
-
|
|
45
|
-
---
|
|
46
|
-
|
|
47
|
-
## Reference Guides
|
|
48
|
-
|
|
49
|
-
### Mermaid Diagram Guide
|
|
50
|
-
|
|
51
|
-
**Key Requirements:** Use basic node definitions only. No HTML tags, no nested subgraphs, no `direction` keyword, no `style` definitions.
|
|
52
|
-
|
|
53
|
-
**Diagram Types**: `graph TB/LR` (structure), `flowchart TD` (logic), `sequenceDiagram` (interactions), `classDiagram` (classes), `erDiagram` (database), `stateDiagram-v2` (states)
|
|
54
|
-
|
|
55
|
-
### Source Traceability Requirements
|
|
56
|
-
|
|
57
|
-
**CRITICAL: All source file links MUST use RELATIVE PATHS.** No absolute paths, no `file://` protocol.
|
|
58
|
-
|
|
59
|
-
**Relative Path Calculation**: Documents at `speccrew-workspace/knowledges/techs/{platform_id}/` are 4 levels deep. Use `../../../../` prefix to reference project root files.
|
|
60
|
-
|
|
61
|
-
**Required Elements**:
|
|
62
|
-
1. File reference block at document beginning listing referenced files
|
|
63
|
-
2. `**Diagram Source**` annotation after each Mermaid diagram
|
|
64
|
-
3. `**Section Source**` annotation at end of major sections
|
|
65
|
-
|
|
66
|
-
### Document Content Specifications
|
|
67
|
-
|
|
68
|
-
#### INDEX.md
|
|
69
|
-
Platform summary, technology stack overview, navigation links, agent usage guide.
|
|
70
|
-
|
|
71
|
-
#### tech-stack.md
|
|
72
|
-
Overview, Core Technologies table, Dependencies (grouped), Development Tools, Configuration Files.
|
|
73
|
-
|
|
74
|
-
#### architecture.md
|
|
75
|
-
**Web**: Component Architecture, State Management, Routing, API Integration, Styling. **Backend**: Layered Architecture, DI, Module Organization, API Design, Middleware. **Mobile**: Widget Structure, State Management, Navigation, Platform considerations.
|
|
76
|
-
|
|
77
|
-
#### conventions-design.md
|
|
78
|
-
Design Principles (SOLID, DRY), Design Patterns, UI Design Conventions (reference ui-style/), Data Flow, Error Handling, Security, Performance.
|
|
79
|
-
|
|
80
|
-
#### conventions-dev.md
|
|
81
|
-
Naming Conventions, Directory Structure, Code Style (from ESLint/Prettier), Import/Export Patterns, Git Commit Conventions, Pre-Development Checklist, Code Review Checklist.
|
|
82
|
-
|
|
83
|
-
**Source extraction**: Prettier (.prettierrc), ESLint (.eslintrc), EditorConfig (.editorconfig), Git hooks (.husky/), Commit conventions (.commitlintrc), Runtime version (.nvmrc), IDE config (.vscode/).
|
|
84
|
-
|
|
85
|
-
#### conventions-unit-test.md / conventions-system-test.md
|
|
86
|
-
Unit Testing (framework, naming, location, template, run command), Integration Testing, E2E Testing (frontend only), Database Testing (backend only), Performance Testing, Coverage Requirements, Troubleshooting.
|
|
87
|
-
|
|
88
|
-
#### conventions-build.md
|
|
89
|
-
Build Tool & Configuration, Environment Management, Build Profiles & Outputs, CI/CD (if detected), Docker (if detected), Dependency Management.
|
|
90
|
-
|
|
91
|
-
#### conventions-data.md (Optional)
|
|
92
|
-
ORM/Database Tool, Data Modeling, Migrations, Query Optimization, Caching.
|
|
93
|
-
|
|
94
|
-
---
|
|
95
|
-
|
|
96
|
-
## Template Usage
|
|
97
|
-
|
|
98
|
-
Templates are located at `./templates/`:
|
|
99
|
-
|
|
100
|
-
| Template File | Purpose |
|
|
101
|
-
|---------------|---------|
|
|
102
|
-
| INDEX-TEMPLATE.md | Platform overview |
|
|
103
|
-
| TECH-STACK-TEMPLATE.md | Technology stack |
|
|
104
|
-
| ARCHITECTURE-TEMPLATE.md | Architecture patterns |
|
|
105
|
-
| CONVENTIONS-DESIGN-TEMPLATE.md | Design principles |
|
|
106
|
-
| CONVENTIONS-DEV-TEMPLATE.md | Development conventions |
|
|
107
|
-
| CONVENTIONS-UNIT-TEST-TEMPLATE.md | Unit testing |
|
|
108
|
-
| CONVENTIONS-SYSTEM-TEST-TEMPLATE.md | System testing |
|
|
109
|
-
| CONVENTIONS-BUILD-TEMPLATE.md | Build/deployment |
|
|
110
|
-
| CONVENTIONS-DATA-TEMPLATE.md | Data layer |
|
|
111
|
-
|
|
112
|
-
## Checklist
|
|
113
|
-
|
|
114
|
-
### Pre-Generation
|
|
115
|
-
- [ ] All configuration files read and parsed
|
|
116
|
-
- [ ] Technology stack extracted accurately
|
|
117
|
-
- [ ] Conventions analyzed from config files
|
|
118
|
-
- [ ] Platform type identified
|
|
119
|
-
- [ ] Data layer detection completed for non-backend platforms
|
|
120
|
-
|
|
121
|
-
### Required Documents (All Platforms)
|
|
122
|
-
- [ ] INDEX.md, tech-stack.md, architecture.md
|
|
123
|
-
- [ ] conventions-design.md, conventions-dev.md
|
|
124
|
-
- [ ] conventions-unit-test.md, conventions-system-test.md, conventions-build.md
|
|
125
|
-
|
|
126
|
-
### Optional Document
|
|
127
|
-
- [ ] conventions-data.md (if applicable)
|
|
128
|
-
|
|
129
|
-
### UI Style Analysis (Frontend Platforms)
|
|
130
|
-
- [ ] ui-analyze skill invoked
|
|
131
|
-
- [ ] ui-style-guide.md generated
|
|
132
|
-
- [ ] UI conventions referenced in conventions-design.md
|
|
133
|
-
|
|
134
|
-
## Task Completion Report
|
|
135
|
-
|
|
136
|
-
Upon completion, output the following structured report:
|
|
137
|
-
|
|
138
|
-
```json
|
|
139
|
-
{
|
|
140
|
-
"status": "success | partial | failed",
|
|
141
|
-
"skill": "speccrew-knowledge-techs-generate",
|
|
142
|
-
"output_files": [
|
|
143
|
-
"{output_path}/INDEX.md",
|
|
144
|
-
"{output_path}/tech-stack.md",
|
|
145
|
-
"{output_path}/architecture.md"
|
|
146
|
-
],
|
|
147
|
-
"summary": "Tech documentation generated for {platform_id}",
|
|
148
|
-
"metrics": {
|
|
149
|
-
"documents_generated": 0,
|
|
150
|
-
"sections_filled": 0,
|
|
151
|
-
"code_examples_included": 0
|
|
152
|
-
},
|
|
153
|
-
"errors": [],
|
|
154
|
-
"next_steps": ["Run quality check via speccrew-knowledge-techs-generate-quality"]
|
|
155
|
-
}
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
---
|
|
159
|
-
|
|
160
|
-
## CONTINUOUS EXECUTION RULES
|
|
161
|
-
|
|
162
|
-
This skill follows the continuous execution pattern defined in `GLOBAL-R1`:
|
|
163
|
-
|
|
164
|
-
1. **Sequential Execution**: All workflow steps must execute in the defined order without interruption.
|
|
165
|
-
2. **No User Prompts**: Worker must not pause for user confirmation between steps.
|
|
166
|
-
3. **Complete All Steps**: Worker must complete all steps before reporting results.
|
|
167
|
-
4. **Error Handling**: If any step fails, continue with remaining steps if possible, then report all errors together.
|
|
168
|
-
5. **Technology Stack Constraint**: Per `GLOBAL-R-TECHSTACK`, all generated documents must align with the detected technology stack.
|
|
14
|
+
> **REQUIRED**: Before executing this workflow, read the XML workflow specification: speccrew-workspace/docs/rules/agentflow-spec.md
|
|
15
|
+
> Then read and execute the XML workflow in SKILL.xml block-by-block as the authoritative execution plan.
|
|
@@ -4,151 +4,12 @@ description: Generate technology convention documents (INDEX, tech-stack, archit
|
|
|
4
4
|
tools: Read, Write, Glob, Grep
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
#
|
|
8
|
-
|
|
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
|
-
|
|
11
|
-
## Trigger Scenarios
|
|
12
|
-
|
|
7
|
+
# Trigger Scenarios
|
|
13
8
|
- "Generate convention documents for {platform}"
|
|
14
9
|
- "Create tech stack and architecture documentation"
|
|
15
10
|
- "Extract development conventions from {platform}"
|
|
16
|
-
- "Generate platform conventions docs"
|
|
17
|
-
- "Create INDEX, tech-stack, and conventions-* files"
|
|
18
|
-
|
|
19
|
-
## User
|
|
20
|
-
|
|
21
|
-
Worker Agent (speccrew-task-worker)
|
|
22
|
-
|
|
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 |
|
|
45
|
-
|
|
46
|
-
## Output
|
|
47
|
-
|
|
48
|
-
Generate the following documents in `${output_path}/`:
|
|
49
|
-
|
|
50
|
-
```
|
|
51
|
-
${output_path}/
|
|
52
|
-
├── INDEX.md # Platform technology index (Required)
|
|
53
|
-
├── tech-stack.md # Technology stack details (Required)
|
|
54
|
-
├── architecture.md # Architecture conventions (Required)
|
|
55
|
-
├── conventions-design.md # Design conventions (Required)
|
|
56
|
-
├── conventions-dev.md # Development conventions (Required)
|
|
57
|
-
├── conventions-unit-test.md # Unit testing conventions (Required)
|
|
58
|
-
├── conventions-system-test.md # System testing conventions (Required)
|
|
59
|
-
├── conventions-build.md # Build & Deployment conventions (Required)
|
|
60
|
-
└── conventions-data.md # Data conventions (Optional)
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
### Platform Type to Document Mapping
|
|
64
|
-
|
|
65
|
-
| Platform Type | Required Documents | Optional Documents | Generate conventions-data.md? |
|
|
66
|
-
|---------------|-------------------|-------------------|------------------------------|
|
|
67
|
-
| `backend` | All 8 docs | - | **Must Generate** - Contains ORM, data modeling, caching strategy |
|
|
68
|
-
| `web` | All 8 docs | conventions-data.md | **Conditional** - Only when using ORM/data layer (Prisma, TypeORM, Sequelize, etc.) |
|
|
69
|
-
| `mobile` | All 8 docs | conventions-data.md | **Default No** - Based on actual tech stack |
|
|
70
|
-
| `desktop` | All 8 docs | conventions-data.md | **Default No** - Based on actual tech stack |
|
|
71
|
-
| `api` | All 8 docs | conventions-data.md | **Conditional** - Based on whether data layer exists |
|
|
72
11
|
|
|
73
12
|
## AgentFlow Definition
|
|
74
|
-
|
|
75
13
|
<!-- @agentflow: SKILL.xml -->
|
|
76
|
-
|
|
77
|
-
>
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
## Constraints
|
|
82
|
-
|
|
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**
|
|
91
|
-
|
|
92
|
-
## Task Completion Report
|
|
93
|
-
|
|
94
|
-
When the task is complete, report the following:
|
|
95
|
-
|
|
96
|
-
**Status:** `success` | `partial` | `failed`
|
|
97
|
-
|
|
98
|
-
**Summary:**
|
|
99
|
-
- Platform: `${platform_id}`
|
|
100
|
-
- Type: `${platform_type}`
|
|
101
|
-
- Framework: `${framework}`
|
|
102
|
-
- Documents generated: 8 required + (1 optional if data layer detected)
|
|
103
|
-
|
|
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
|
|
115
|
-
|
|
116
|
-
## Checklist
|
|
117
|
-
|
|
118
|
-
### Pre-Generation
|
|
119
|
-
- [ ] All template files read successfully
|
|
120
|
-
- [ ] All configuration files read and parsed
|
|
121
|
-
- [ ] Technology stack extracted accurately
|
|
122
|
-
- [ ] Conventions analyzed from config files
|
|
123
|
-
|
|
124
|
-
### Document Generation
|
|
125
|
-
- [ ] INDEX.md generated with navigation
|
|
126
|
-
- [ ] tech-stack.md generated with dependency tables
|
|
127
|
-
- [ ] architecture.md generated with platform-specific patterns
|
|
128
|
-
- [ ] conventions-design.md generated with design principles
|
|
129
|
-
- [ ] conventions-dev.md generated with naming and style rules
|
|
130
|
-
- [ ] conventions-unit-test.md generated with unit testing requirements
|
|
131
|
-
- [ ] conventions-system-test.md generated with system testing requirements
|
|
132
|
-
- [ ] conventions-build.md generated with build and deployment conventions
|
|
133
|
-
- [ ] conventions-data.md generated (only if applicable per platform type mapping)
|
|
134
|
-
|
|
135
|
-
### Quality Checks
|
|
136
|
-
- [ ] All files written to output_path
|
|
137
|
-
- [ ] **Source traceability**: File reference block added to each document
|
|
138
|
-
- [ ] **Source traceability**: Diagram Source annotations added after each Mermaid diagram
|
|
139
|
-
- [ ] **Source traceability**: Section Source annotations added at end of major sections
|
|
140
|
-
- [ ] **Mermaid compatibility**: No `style`, `direction`, `<br/>`, or nested subgraphs
|
|
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
|
|
14
|
+
> **REQUIRED**: Before executing this workflow, read the XML workflow specification: speccrew-workspace/docs/rules/agentflow-spec.md
|
|
15
|
+
> Then read and execute the XML workflow in SKILL.xml block-by-block as the authoritative execution plan.
|