speccrew 0.7.61 → 0.7.62
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/skills/speccrew-sd-backend/SKILL.md +3 -374
- package/.speccrew/skills/speccrew-sd-backend/workflow.agentflow.xml +330 -52
- package/.speccrew/skills/speccrew-sd-frontend/SKILL.md +1 -338
- package/.speccrew/skills/speccrew-sd-frontend/workflow.agentflow.xml +235 -30
- package/.speccrew/skills/speccrew-sd-mobile/SKILL.md +1 -336
- package/.speccrew/skills/speccrew-sd-mobile/workflow.agentflow.xml +324 -62
- package/package.json +1 -1
|
@@ -6,383 +6,12 @@ tools: Read, Write, Glob, Grep
|
|
|
6
6
|
|
|
7
7
|
# Trigger Scenarios
|
|
8
8
|
|
|
9
|
+
- System Designer Agent dispatches this skill with platform context (platform_id, techs paths, Feature Spec paths)
|
|
9
10
|
- Feature Spec has been confirmed, user requests backend system design
|
|
10
|
-
-
|
|
11
|
-
- User asks "Design backend implementation" or "Create backend design for {platform}"
|
|
11
|
+
- User asks "Create backend design for this platform" or "Generate backend module design"
|
|
12
12
|
|
|
13
13
|
## AgentFlow Definition
|
|
14
14
|
|
|
15
15
|
<!-- @agentflow: workflow.agentflow.xml -->
|
|
16
16
|
|
|
17
|
-
> **REQUIRED**:
|
|
18
|
-
|
|
19
|
-
## Workflow
|
|
20
|
-
|
|
21
|
-
## Absolute Constraints
|
|
22
|
-
|
|
23
|
-
> **These rules apply to ALL steps. Violation = task failure.**
|
|
24
|
-
|
|
25
|
-
1. **FORBIDDEN: `create_file` for documents** — NEVER use `create_file` to write design documents or INDEX. Documents MUST be created by copying the template (Step 4.2a / Step 5.2a) then filling sections with `search_replace` (Step 4.2b / Step 5.2b). `create_file` produces truncated output on large files.
|
|
26
|
-
|
|
27
|
-
2. **FORBIDDEN: Full-file rewrite** — NEVER replace the entire document content in a single operation. Always use targeted `search_replace` on specific sections.
|
|
28
|
-
|
|
29
|
-
3. **MANDATORY: Template-first workflow** — Copy template MUST execute before fill sections. Skipping copy and writing content directly is FORBIDDEN.
|
|
30
|
-
|
|
31
|
-
4. **MANDATORY: Output filename pattern** — Output filename MUST follow pattern: `{feature_id}-{feature_name}-design.md`. Omitting feature_id or using alternative naming is FORBIDDEN.
|
|
32
|
-
|
|
33
|
-
## Step 1: Read Inputs
|
|
34
|
-
|
|
35
|
-
> **Conditional Execution**: If `index_only` = `true`, **skip Steps 1-4** and jump directly to Step 5 to generate INDEX.md.
|
|
36
|
-
|
|
37
|
-
**Input Parameters** (from agent context):
|
|
38
|
-
- `feature_id` (optional): Feature identifier, e.g., `F-CRM-01`. If provided, use new naming format.
|
|
39
|
-
- `feature_name`: Feature name, e.g., `customer-list`.
|
|
40
|
-
- `platform_id`: Target platform, e.g., `backend-spring`, `backend-nestjs`.
|
|
41
|
-
- `skip_confirmation` (optional, boolean): When `true`, skip Checkpoint A user confirmation (used in batch dispatch mode)
|
|
42
|
-
- `skip_index_generation` (optional, boolean): When `true`, skip Step 5 INDEX.md generation (INDEX.md will be generated by orchestrator after all workers complete)
|
|
43
|
-
- `index_only` (optional, boolean): When `true`, skip Steps 1-4 and ONLY execute Step 5 (INDEX.md generation). Used after all platform workers complete.
|
|
44
|
-
- `task_id` (optional, string): Task identifier in DISPATCH-PROGRESS.json. Used for status tracking.
|
|
45
|
-
- `dispatch_progress_file` (optional, string): Path to DISPATCH-PROGRESS.json. If provided, worker updates its own task status on completion.
|
|
46
|
-
- `update_progress_script` (optional, string): Path to update-progress.js script.
|
|
47
|
-
|
|
48
|
-
Read in order:
|
|
49
|
-
|
|
50
|
-
1. **Feature Spec document(s)**: `speccrew-workspace/iterations/{number}-{type}-{name}/02.feature-design/{feature-id}-{feature-name}-feature-spec.md`
|
|
51
|
-
2. **API Contract**: `speccrew-workspace/iterations/{number}-{type}-{name}/03.api-contract/{feature-id}-{feature-name}-api-contract.md`
|
|
52
|
-
3. **Backend techs knowledge** (paths from agent context):
|
|
53
|
-
- `speccrew-workspace/knowledges/techs/{platform_id}/tech-stack.md`
|
|
54
|
-
- `speccrew-workspace/knowledges/techs/{platform_id}/architecture.md`
|
|
55
|
-
- `speccrew-workspace/knowledges/techs/{platform_id}/conventions-design.md`
|
|
56
|
-
- `speccrew-workspace/knowledges/techs/{platform_id}/conventions-dev.md`
|
|
57
|
-
- `speccrew-workspace/knowledges/techs/{platform_id}/conventions-data.md` (critical for backend: ORM, data modeling, migration)
|
|
58
|
-
4. **Design template**: `speccrew-sd-backend/templates/SD-BACKEND-TEMPLATE.md`
|
|
59
|
-
5. **Index template**: `speccrew-sd-backend/templates/INDEX-TEMPLATE.md`
|
|
60
|
-
|
|
61
|
-
## Step 2: Analyze Existing Code Structure
|
|
62
|
-
|
|
63
|
-
Use Glob/Grep to understand current backend codebase:
|
|
64
|
-
|
|
65
|
-
| Analysis Target | Purpose |
|
|
66
|
-
|-----------------|---------|
|
|
67
|
-
| Controller/Router layer structure | Understand routing patterns and naming conventions |
|
|
68
|
-
| Service layer organization | Identify service boundaries and reuse opportunities |
|
|
69
|
-
| Repository/DAO layer patterns | Review data access patterns |
|
|
70
|
-
| Entity/Model definitions | Understand existing data models |
|
|
71
|
-
| Middleware stack | Identify cross-cutting concerns |
|
|
72
|
-
| Exception handling patterns | Review error handling approach |
|
|
73
|
-
| Database migration structure | Understand migration naming and structure |
|
|
74
|
-
| Naming conventions | Ensure consistency with existing code |
|
|
75
|
-
|
|
76
|
-
## Step 3: Extract Functions from Feature Spec
|
|
77
|
-
|
|
78
|
-
Parse Feature Spec to identify all backend-relevant functions.
|
|
79
|
-
|
|
80
|
-
> **Note**: With the new fine-grained Feature Spec format, each Feature Spec typically contains **3-8 functions** (previously 10-20). The extraction logic remains the same, but the scope is more focused.
|
|
81
|
-
|
|
82
|
-
For each function, extract:
|
|
83
|
-
|
|
84
|
-
| Aspect | Content |
|
|
85
|
-
|--------|---------|
|
|
86
|
-
| **API Interfaces** | From Feature Spec Section 2.N backend part |
|
|
87
|
-
| **Data Access Requirements** | What data needs to be read/written |
|
|
88
|
-
| **Business Logic Flow** | Core processing steps |
|
|
89
|
-
| **Cross-Module Dependencies** | Dependencies on other modules or services |
|
|
90
|
-
|
|
91
|
-
Cross-reference with API Contract for exact endpoint specifications.
|
|
92
|
-
|
|
93
|
-
Mark each function as:
|
|
94
|
-
|
|
95
|
-
| Marker | Meaning |
|
|
96
|
-
|--------|---------|
|
|
97
|
-
| `[EXISTING]` | Reuse current implementation, no changes needed |
|
|
98
|
-
| `[MODIFIED]` | Modify existing implementation |
|
|
99
|
-
| `[NEW]` | Create brand new implementation |
|
|
100
|
-
|
|
101
|
-
**Checkpoint A**:
|
|
102
|
-
- If `skip_confirmation` = `true`: Log the function list with markers and **proceed automatically** without waiting for user confirmation.
|
|
103
|
-
- If `skip_confirmation` is not set or `false`: Present function list with markers to user and **wait for explicit confirmation** before proceeding.
|
|
104
|
-
|
|
105
|
-
> ⚠️ **FORBIDDEN**: Worker MUST NOT self-decide to skip confirmation. Only the `skip_confirmation` parameter from dispatch context controls this behavior.
|
|
106
|
-
|
|
107
|
-
## Step 4: Generate Module Design Documents
|
|
108
|
-
|
|
109
|
-
For each function (or logical group = one controller/module):
|
|
110
|
-
|
|
111
|
-
### Output File Naming Convention
|
|
112
|
-
|
|
113
|
-
**MANDATORY**: The design document file MUST be named using this exact pattern:
|
|
114
|
-
|
|
115
|
-
```
|
|
116
|
-
{feature_id}-{feature_name}-design.md
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
Examples:
|
|
120
|
-
- `F-M01-05-操作日志-design.md` ✅
|
|
121
|
-
- `F-M02-01-顾客档案管理-design.md` ✅
|
|
122
|
-
- `member-level-change-history-design.md` ❌ (missing feature_id prefix)
|
|
123
|
-
- `customer-profile-design.md` ❌ (missing feature_id prefix)
|
|
124
|
-
|
|
125
|
-
Where:
|
|
126
|
-
- `feature_id`: The exact feature ID from dispatch context (e.g., `F-M01-05`, `F-M02-01`)
|
|
127
|
-
- `feature_name`: The exact feature name from dispatch context (e.g., `操作日志`, `顾客档案管理`)
|
|
128
|
-
|
|
129
|
-
> ⚠️ **FORBIDDEN**:
|
|
130
|
-
> - Using any filename format other than `{feature_id}-{feature_name}-design.md`
|
|
131
|
-
> - Omitting the feature_id prefix
|
|
132
|
-
> - Translating or paraphrasing the feature_name (must use the exact name from context)
|
|
133
|
-
> - Using function/sub-feature names instead of the main feature_name
|
|
134
|
-
|
|
135
|
-
### 4.1 Read Template
|
|
136
|
-
|
|
137
|
-
Read the SD-BACKEND-TEMPLATE.md to understand document structure.
|
|
138
|
-
|
|
139
|
-
### 4.2a Copy Template to Document Path
|
|
140
|
-
|
|
141
|
-
1. **Read the design template**: `templates/SD-BACKEND-TEMPLATE.md`
|
|
142
|
-
2. **Replace top-level placeholders** with known variables:
|
|
143
|
-
- Module name, feature name, platform ID, etc.
|
|
144
|
-
3. **Create the document file** using `create_file`:
|
|
145
|
-
- **Target path pattern**:
|
|
146
|
-
- With `feature_id`: `speccrew-workspace/iterations/{number}-{type}-{name}/03.system-design/{platform_id}/{feature-id}-{feature-name}-design.md`
|
|
147
|
-
- Example: `03.system-design/backend-spring/F-CRM-01-customer-list-design.md`
|
|
148
|
-
- Without `feature_id` (backward compatibility): `speccrew-workspace/iterations/{number}-{type}-{name}/03.system-design/{platform_id}/{module}-design.md`
|
|
149
|
-
- Content: Template with top-level placeholders replaced
|
|
150
|
-
4. **Verify**: Document should have complete section structure ready for filling
|
|
151
|
-
|
|
152
|
-
### 4.2b Fill Each Section Using search_replace
|
|
153
|
-
|
|
154
|
-
Fill each section with technology-specific implementation details.
|
|
155
|
-
|
|
156
|
-
> ⚠️ **CRITICAL CONSTRAINTS:**
|
|
157
|
-
> - **FORBIDDEN: `create_file` to rewrite the entire document** — it destroys template structure
|
|
158
|
-
> - **MUST use `search_replace` to fill each section individually**
|
|
159
|
-
> - **All section titles and numbering MUST be preserved**
|
|
160
|
-
> - If a section has no applicable content, keep the section title and replace placeholder with "N/A"
|
|
161
|
-
|
|
162
|
-
| Section | Content Source |
|
|
163
|
-
|---------|----------------|
|
|
164
|
-
| **Module Structure** | Use actual framework layering from techs knowledge |
|
|
165
|
-
| **Interface Pseudo-code** | Use actual framework decorators/annotations |
|
|
166
|
-
| **Database Design** | Use actual ORM entity definitions from conventions-data.md |
|
|
167
|
-
| **Transaction Boundaries** | Use actual framework transaction mechanism |
|
|
168
|
-
| **Exception Handling** | Use actual exception classes and error codes |
|
|
169
|
-
|
|
170
|
-
**How to Reference Techs Knowledge for Pseudo-code:**
|
|
171
|
-
|
|
172
|
-
1. **Read relevant techs knowledge file for the platform**:
|
|
173
|
-
- Core syntax: `tech-stack.md` for framework version and key libraries
|
|
174
|
-
- ORM patterns: `conventions-data.md` for entity definitions and transaction management
|
|
175
|
-
- Design patterns: `conventions-design.md` for layer structure and naming conventions
|
|
176
|
-
2. **Extract framework-specific syntax patterns**:
|
|
177
|
-
- Controller annotations/decorators
|
|
178
|
-
- Service injection patterns
|
|
179
|
-
- Repository/DAO method signatures
|
|
180
|
-
- Transaction management annotations
|
|
181
|
-
3. **Apply patterns in pseudo-code**:
|
|
182
|
-
- Use exact annotation/decorator syntax from techs knowledge
|
|
183
|
-
- Follow naming conventions from conventions-design.md
|
|
184
|
-
- Apply ORM patterns from conventions-data.md
|
|
185
|
-
|
|
186
|
-
**Pseudo-code Requirements:**
|
|
187
|
-
- MUST use actual framework syntax from techs knowledge
|
|
188
|
-
- Spring Boot: `@RestController`, `@PostMapping`, `@Valid`, `@Transactional`, etc.
|
|
189
|
-
- NestJS: `@Controller`, `@Post`, `@Body`, `@UseGuards`, etc.
|
|
190
|
-
- Go: `gin.Context`, `echo.Context`, GORM annotations, etc.
|
|
191
|
-
|
|
192
|
-
### 4.3 Verify Output
|
|
193
|
-
|
|
194
|
-
Verify the completed design document:
|
|
195
|
-
- All sections filled with actual content (no remaining placeholders)
|
|
196
|
-
- Mermaid diagrams render correctly
|
|
197
|
-
- Pseudo-code uses actual framework syntax from techs knowledge
|
|
198
|
-
|
|
199
|
-
## Step 5: Generate Platform INDEX.md
|
|
200
|
-
|
|
201
|
-
> **Conditional Execution**:
|
|
202
|
-
> - If `skip_index_generation` = `true`, **skip this entire Step 5**.
|
|
203
|
-
> - If `index_only` = `true`, this step is the ONLY step to execute (Steps 1-4 are skipped).
|
|
204
|
-
|
|
205
|
-
After all module designs are complete:
|
|
206
|
-
|
|
207
|
-
### 5.1 Read Index Template
|
|
208
|
-
|
|
209
|
-
Read INDEX-TEMPLATE.md to understand platform-level document structure.
|
|
210
|
-
|
|
211
|
-
### 5.2a Copy Index Template to Document Path
|
|
212
|
-
|
|
213
|
-
1. **Read the index template**: `templates/INDEX-TEMPLATE.md`
|
|
214
|
-
2. **Replace top-level placeholders** (platform name, feature name, etc.)
|
|
215
|
-
3. **Create the document file** using `create_file`:
|
|
216
|
-
- Target path: `speccrew-workspace/iterations/{number}-{type}-{name}/03.system-design/{platform_id}/INDEX.md`
|
|
217
|
-
- Content: Template with top-level placeholders replaced
|
|
218
|
-
|
|
219
|
-
### 5.2b Fill Index Sections Using search_replace
|
|
220
|
-
|
|
221
|
-
> ⚠️ **CRITICAL CONSTRAINTS:**
|
|
222
|
-
> - **FORBIDDEN: `create_file` to rewrite the entire document** — it destroys template structure
|
|
223
|
-
> - **MUST use `search_replace` to fill each section individually**
|
|
224
|
-
> - **All section titles and numbering MUST be preserved**
|
|
225
|
-
|
|
226
|
-
| Section | Content |
|
|
227
|
-
|---------|---------|
|
|
228
|
-
| **Tech Stack Summary** | Extract from techs knowledge |
|
|
229
|
-
| **Shared Design Decisions** | Middleware stack, data source config, base service classes, common utilities |
|
|
230
|
-
| **Module List Table** | Links to each module design document. Use `feature_id` as identifier if available (e.g., `F-CRM-01`), otherwise use module name. Example: `\| F-CRM-01 \| Customer List \| F-CRM-01-customer-list-design.md \| NEW \|` |
|
|
231
|
-
| **Cross-Module Interaction Notes** | Shared services, event-driven patterns, dependencies |
|
|
232
|
-
| **Database Schema Overview** | New tables, modified tables, entity relationships |
|
|
233
|
-
|
|
234
|
-
### 5.3 Verify Output
|
|
235
|
-
|
|
236
|
-
Verify the completed INDEX.md:
|
|
237
|
-
- All sections filled with actual content (no remaining placeholders)
|
|
238
|
-
- All module design documents are correctly linked
|
|
239
|
-
- Database schema overview is complete
|
|
240
|
-
|
|
241
|
-
## Step 6: Present Summary
|
|
242
|
-
|
|
243
|
-
Present to user:
|
|
244
|
-
|
|
245
|
-
```
|
|
246
|
-
Backend System Design Summary for: {feature-name}
|
|
247
|
-
Platform: {platform_id}
|
|
248
|
-
|
|
249
|
-
Module Designs: {count}
|
|
250
|
-
├── [NEW] {count} modules
|
|
251
|
-
├── [MODIFIED] {count} modules
|
|
252
|
-
└── [EXISTING] {count} modules (no design needed)
|
|
253
|
-
|
|
254
|
-
Database Changes:
|
|
255
|
-
├── New Tables: {count}
|
|
256
|
-
├── Modified Tables: {count}
|
|
257
|
-
└── Migration Files: {count}
|
|
258
|
-
|
|
259
|
-
Key Design Decisions:
|
|
260
|
-
- {decision 1}
|
|
261
|
-
- {decision 2}
|
|
262
|
-
- {decision 3}
|
|
263
|
-
|
|
264
|
-
Files Generated:
|
|
265
|
-
- {list all file paths}
|
|
266
|
-
```
|
|
267
|
-
|
|
268
|
-
## Step 7: Update Task Status (if dispatch_progress_file provided)
|
|
269
|
-
|
|
270
|
-
> **Conditional Execution**: Only execute this step if `dispatch_progress_file` and `task_id` parameters are provided in the dispatch context.
|
|
271
|
-
|
|
272
|
-
Update the task status in DISPATCH-PROGRESS.json to mark this task as completed:
|
|
273
|
-
|
|
274
|
-
```
|
|
275
|
-
node "${update_progress_script}" update-task --file "${dispatch_progress_file}" --task-id "${task_id}" --status completed
|
|
276
|
-
```
|
|
277
|
-
|
|
278
|
-
If the design document generation failed at any step, update with status `failed` instead:
|
|
279
|
-
```
|
|
280
|
-
node "${update_progress_script}" update-task --file "${dispatch_progress_file}" --task-id "${task_id}" --status failed
|
|
281
|
-
```
|
|
282
|
-
|
|
283
|
-
> ⚠️ **IMPORTANT**: This step MUST be the last action before returning the completion report. Do NOT skip this step in batch dispatch mode.
|
|
284
|
-
|
|
285
|
-
## Step 8: Task Completion Report
|
|
286
|
-
|
|
287
|
-
After completing all steps, output a structured completion report for the System Designer Agent to parse and update DISPATCH-PROGRESS.json:
|
|
288
|
-
|
|
289
|
-
### On Success
|
|
290
|
-
|
|
291
|
-
```
|
|
292
|
-
## Task Completion Report
|
|
293
|
-
- **Status**: SUCCESS
|
|
294
|
-
- **Task ID**: {task_id from context}
|
|
295
|
-
- **Platform**: {platform_id}
|
|
296
|
-
- **Feature ID**: {feature_id}
|
|
297
|
-
- **Feature**: {feature_name}
|
|
298
|
-
- **Output Files**:
|
|
299
|
-
- speccrew-workspace/iterations/{iter}/03.system-design/{platform_id}/INDEX.md
|
|
300
|
-
- speccrew-workspace/iterations/{iter}/03.system-design/{platform_id}/{feature-id}-{feature-name}-design.md (or {module}-design.md if no feature_id)
|
|
301
|
-
- **Summary**: Backend system design completed for {feature_name} on {platform_id} with {count} module designs
|
|
302
|
-
```
|
|
303
|
-
|
|
304
|
-
### On Failure
|
|
305
|
-
|
|
306
|
-
```
|
|
307
|
-
## Task Completion Report
|
|
308
|
-
- **Status**: FAILED
|
|
309
|
-
- **Task ID**: {task_id from context}
|
|
310
|
-
- **Platform**: {platform_id}
|
|
311
|
-
- **Feature ID**: {feature_id}
|
|
312
|
-
- **Feature**: {feature_name}
|
|
313
|
-
- **Output Files**: []
|
|
314
|
-
- **Error**: {description of what went wrong}
|
|
315
|
-
- **Error Category**: DEPENDENCY_MISSING | VALIDATION_ERROR | BLOCKED
|
|
316
|
-
- **Recovery Hint**: {suggestion for how to resolve or retry}
|
|
317
|
-
```
|
|
318
|
-
|
|
319
|
-
**Error Categories:**
|
|
320
|
-
- `DEPENDENCY_MISSING`: Required input file or knowledge document not found
|
|
321
|
-
- `VALIDATION_ERROR`: Input validation failed (e.g., invalid Feature Spec format)
|
|
322
|
-
- `BLOCKED`: Blocked by external dependency or prerequisite not met
|
|
323
|
-
|
|
324
|
-
## OUTPUT EFFICIENCY RULES
|
|
325
|
-
|
|
326
|
-
When executing this skill:
|
|
327
|
-
|
|
328
|
-
1. **Direct-to-File Output**: All design content (architecture diagrams, API mappings, component specifications, data models) MUST be written directly to the output file
|
|
329
|
-
2. **Minimal Conversation Output**: Only output:
|
|
330
|
-
- Block execution announcements (1 line each): `"[Block XX] Designing..."`
|
|
331
|
-
- Error messages requiring attention
|
|
332
|
-
- Task Completion Report (final summary)
|
|
333
|
-
3. **FORBIDDEN in conversation**:
|
|
334
|
-
- ❌ Full document sections or drafts
|
|
335
|
-
- ❌ Mermaid diagrams displayed in chat
|
|
336
|
-
- ❌ API endpoint listings
|
|
337
|
-
- ❌ Data model tables
|
|
338
|
-
- ❌ Architecture descriptions longer than 2 lines
|
|
339
|
-
4. **Rationale**: Workers run in batch mode. Displaying design content in conversation wastes context window and provides no value since content goes to file anyway.
|
|
340
|
-
|
|
341
|
-
# Key Rules
|
|
342
|
-
|
|
343
|
-
| Rule | Description |
|
|
344
|
-
|------|-------------|
|
|
345
|
-
| **Actual Framework Syntax** | All pseudo-code MUST use actual framework/library syntax from techs knowledge |
|
|
346
|
-
| **API Contract is READ-ONLY** | Do NOT modify API Contract, stop and report if issues found |
|
|
347
|
-
| **Migration Strategy Required** | Database design must include migration strategy, not just final schema |
|
|
348
|
-
| **Explicit Transaction Boundaries** | Transaction boundaries must be explicitly marked |
|
|
349
|
-
| **Exception Code Mapping** | Exception handling must map to API Contract error codes |
|
|
350
|
-
| **Follow Techs Conventions** | Naming, directory structure, patterns from techs knowledge |
|
|
351
|
-
| **FORBIDDEN: TODO/FIXME Placeholders** | Design documents MUST contain complete implementation logic. Do NOT use TODO, FIXME, HACK, or any placeholder comments. Every method, validation rule, and business logic MUST be fully specified with actual pseudocode. |
|
|
352
|
-
| **API Route Consistency** | All API routes in the design document MUST exactly match the routes defined in the API Contract document. Before writing any route, READ the API Contract and copy routes verbatim. Do NOT invent or modify routes. |
|
|
353
|
-
| **Cross-Feature Dependency Marking** | When referencing functionality from another Feature (e.g., conflict detection from F-APPT-002), MUST explicitly mark it as `[DEPENDENCY: F-XXX-NNN]` and define a degradation strategy for when that Feature is not yet implemented. |
|
|
354
|
-
| **Output Filename Pattern** | Output filename MUST follow pattern: `{feature_id}-{feature_name}-design.md` |
|
|
355
|
-
|
|
356
|
-
# Mermaid Diagram Requirements
|
|
357
|
-
|
|
358
|
-
When generating Mermaid diagrams, follow compatibility guidelines:
|
|
359
|
-
|
|
360
|
-
- Use only basic node definitions: `A[text content]`
|
|
361
|
-
- No HTML tags (e.g., `<br/>`)
|
|
362
|
-
- No nested subgraphs
|
|
363
|
-
- No `direction` keyword
|
|
364
|
-
- No `style` definitions
|
|
365
|
-
- No special characters in node text
|
|
366
|
-
- Use standard `graph TB/LR` or `flowchart TD/LR` or `erDiagram` syntax only
|
|
367
|
-
|
|
368
|
-
# Checklist
|
|
369
|
-
|
|
370
|
-
- [ ] All techs knowledge documents loaded before design
|
|
371
|
-
- [ ] Feature Spec and API Contract read and understood
|
|
372
|
-
- [ ] Existing codebase structure analyzed (Glob/Grep)
|
|
373
|
-
- [ ] Function extraction completed with [EXISTING]/[MODIFIED]/[NEW] markers
|
|
374
|
-
- [ ] Checkpoint A passed: function list confirmed (or skipped via skip_confirmation)
|
|
375
|
-
- [ ] Every API in API Contract has a corresponding implementation design
|
|
376
|
-
- [ ] Database entities cover all data requirements from Feature Spec
|
|
377
|
-
- [ ] Transaction boundaries defined for multi-step operations
|
|
378
|
-
- [ ] Exception types map to API Contract error codes
|
|
379
|
-
- [ ] Pseudo-code uses actual framework syntax (not generic)
|
|
380
|
-
- [ ] conventions-data.md ORM patterns followed
|
|
381
|
-
- [ ] Migration requirements documented
|
|
382
|
-
- [ ] INDEX.md generated with complete module list
|
|
383
|
-
- [ ] All files written to correct paths under 03.system-design/{platform_id}/
|
|
384
|
-
- [ ] Output file named as `{feature_id}-{feature_name}-design.md`
|
|
385
|
-
- [ ] All Mermaid diagrams follow compatibility guidelines
|
|
386
|
-
- [ ] **No TODO/FIXME placeholders** — all methods have complete pseudocode implementation
|
|
387
|
-
- [ ] **API routes match API Contract exactly** — verified route-by-route
|
|
388
|
-
- [ ] **Cross-Feature dependencies explicitly marked** — all `[DEPENDENCY: F-XXX-NNN]` tags present with degradation strategy
|
|
17
|
+
> **REQUIRED**: Read and execute the XML workflow above. The XML contains the complete workflow definition including all steps, rules, conditions, and checklist.
|