speccrew 0.5.15 โ 0.5.16
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-team-leader.md +60 -4
- package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/SKILL.md +63 -626
- package/.speccrew/skills/speccrew-knowledge-bizs-api-graph/SKILL.md +505 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/SKILL.md +165 -31
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/SKILL.md +63 -728
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-graph/SKILL.md +389 -0
- package/.speccrew/skills/speccrew-knowledge-module-summarize/SKILL.md +26 -0
- package/.speccrew/skills/speccrew-knowledge-system-summarize/SKILL.md +27 -0
- package/.speccrew/skills/speccrew-knowledge-techs-dispatch/SKILL.md +185 -21
- package/.speccrew/skills/speccrew-knowledge-techs-generate/SKILL.md +134 -883
- package/.speccrew/skills/speccrew-knowledge-techs-generate-conventions/SKILL.md +36 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate-quality/SKILL.md +414 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate-ui-style/SKILL.md +35 -0
- package/package.json +1 -1
|
@@ -59,24 +59,25 @@ This skill operates in **strict sequential execution mode**:
|
|
|
59
59
|
- Output step status after each step completion
|
|
60
60
|
- Do NOT skip any step
|
|
61
61
|
|
|
62
|
-
## ๐ซ ABSOLUTE PROHIBITIONS
|
|
62
|
+
## ๐ซ ABSOLUTE PROHIBITIONS
|
|
63
63
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
2. **FORBIDDEN: File deletion** โ NEVER use `Remove-Item`, `del`, `rm`, `fs.unlinkSync`, or any delete command on generated files. If a file is malformed, fix it with `search_replace`.
|
|
69
|
-
|
|
70
|
-
3. **FORBIDDEN: Full-file rewrite** โ NEVER replace the entire document content in a single operation. Always use targeted `search_replace` on specific sections.
|
|
71
|
-
|
|
72
|
-
4. **MANDATORY: Template-first workflow** โ Step 5a (copy template) MUST execute before Step 5b (fill sections). Skipping Step 5a and writing content directly is FORBIDDEN.
|
|
64
|
+
- **NEVER** use `create_file` for documents - use template copy + `search_replace`
|
|
65
|
+
- **NEVER** delete generated files - fix with `search_replace`
|
|
66
|
+
- **NEVER** rewrite entire document - use targeted `search_replace`
|
|
67
|
+
- **ALWAYS** copy template (Step 5a) before filling sections (Step 5b)
|
|
73
68
|
|
|
74
69
|
## Output
|
|
75
70
|
|
|
76
71
|
**Generated Files:**
|
|
77
72
|
1. `{{documentPath}}` - Controller documentation file
|
|
78
73
|
2. `{{completed_dir}}/{module}-{subpath}-{fileName}.done.json` - Completion status marker
|
|
79
|
-
|
|
74
|
+
|
|
75
|
+
**Graph Data Generation:**
|
|
76
|
+
Graph data (nodes, edges) construction is handled by `speccrew-knowledge-bizs-api-graph` Skill.
|
|
77
|
+
After completing API analysis, dispatch will invoke the graph skill to generate `.graph.json` files.
|
|
78
|
+
|
|
79
|
+
**See Also:**
|
|
80
|
+
- `speccrew-knowledge-bizs-api-graph` - Constructs knowledge graph data from API analysis results
|
|
80
81
|
|
|
81
82
|
**Return Value:**
|
|
82
83
|
```json
|
|
@@ -297,47 +298,9 @@ public class UserController {
|
|
|
297
298
|
- Include detailed business logic steps in Service layer
|
|
298
299
|
- Mark each step with source file reference (Controller/Service/Mapper)
|
|
299
300
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
While analyzing the controller, simultaneously extract graph nodes and edges:
|
|
303
|
-
|
|
304
|
-
**Nodes to Extract:**
|
|
305
|
-
|
|
306
|
-
| Node Type | Source | ID Format | Context Fields |
|
|
307
|
-
|-----------|--------|-----------|----------------|
|
|
308
|
-
| `api` | Each public API endpoint | `api-{module}-{name}` | `method`, `path`, `params`, `tables`, `permissions` |
|
|
309
|
-
| `service` | Each injected service | `service-{module}-{name}` | `methods`, `dependencies` |
|
|
310
|
-
| `table` | Each database table accessed | `table-{module}-{tableName}` | `fields`, `indexes`, `engine` |
|
|
311
|
-
| `dto` | Each request/response DTO | `dto-{module}-{name}` | `fields`, `validation` |
|
|
312
|
-
|
|
313
|
-
**Edges to Extract:**
|
|
314
|
-
|
|
315
|
-
| Edge Type | Direction | When to Create |
|
|
316
|
-
|-----------|-----------|----------------|
|
|
317
|
-
| `operates` | api โ table | API endpoint reads/writes a database table |
|
|
318
|
-
| `invokes` | api โ service | Controller calls a service method |
|
|
319
|
-
| `references` | api โ dto | API endpoint uses a request/response DTO |
|
|
320
|
-
| `depends-on` | service โ service | Service depends on another service |
|
|
321
|
-
| `maps-to` | dto โ table | DO/Entity maps to database table |
|
|
322
|
-
|
|
323
|
-
**Node ID Naming Convention:**
|
|
324
|
-
```
|
|
325
|
-
{type}-{module}-{name}
|
|
326
|
-
Examples:
|
|
327
|
-
api-system-user-list
|
|
328
|
-
api-system-user-create
|
|
329
|
-
service-system-user-service
|
|
330
|
-
table-system-system_user
|
|
331
|
-
dto-system-user-create-req
|
|
332
|
-
```
|
|
333
|
-
|
|
334
|
-
**IMPORTANT:**
|
|
335
|
-
- `module` comes from `{{module}}` input variable
|
|
336
|
-
- `name` should be a short, readable slug derived from the entity name
|
|
337
|
-
- Each node must include `sourcePath` and `documentPath` (if applicable)
|
|
338
|
-
- Edge `metadata` should include operation details (method name, SQL operation type, etc.)
|
|
301
|
+
**Output:** "Step 3 Status: โ
COMPLETED - Extracted {{endpointCount}} API endpoints, {{flowCount}} business flows"
|
|
339
302
|
|
|
340
|
-
**
|
|
303
|
+
> **Note:** Graph data (nodes, edges) construction is handled by the `speccrew-knowledge-bizs-api-graph` Skill. This skill focuses on API analysis and documentation only.
|
|
341
304
|
|
|
342
305
|
### Step 4: Find API Consumers
|
|
343
306
|
|
|
@@ -422,334 +385,30 @@ Fill sections in order (1 โ 10), using `search_replace` for each content block
|
|
|
422
385
|
|
|
423
386
|
---
|
|
424
387
|
|
|
425
|
-
#### Section 1:
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
**
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
Replace placeholder list items with actual endpoints:
|
|
450
|
-
|
|
451
|
-
```
|
|
452
|
-
original: "- [ ] {GET /page} - {Description}"
|
|
453
|
-
new: "- [x] GET /page - ๅ้กตๆฅ่ฏข็จๆทๅ่กจ"
|
|
454
|
-
```
|
|
455
|
-
|
|
456
|
-
Repeat for each endpoint discovered in Step 3.
|
|
457
|
-
|
|
458
|
-
---
|
|
459
|
-
|
|
460
|
-
#### Section 2: API Endpoint Definitions
|
|
461
|
-
|
|
462
|
-
**Locate anchor:** `<!-- AI-TAG: API_ENDPOINTS -->`
|
|
463
|
-
|
|
464
|
-
For each API endpoint found in Step 3, fill the corresponding subsection:
|
|
465
|
-
|
|
466
|
-
**Fill Endpoint Information Table:**
|
|
467
|
-
|
|
468
|
-
```
|
|
469
|
-
original: "| Method | {GET/POST/PUT/DELETE} |"
|
|
470
|
-
new: "| Method | GET |"
|
|
471
|
-
|
|
472
|
-
original: "| Path | {/admin-api/system/user/page} |"
|
|
473
|
-
new: "| Path | /admin-api/system/user/page |"
|
|
474
|
-
|
|
475
|
-
original: "| Description | {Brief description of what this endpoint does} |"
|
|
476
|
-
new: "| Description | ๅ้กตๆฅ่ฏข็จๆทๅ่กจ |"
|
|
477
|
-
|
|
478
|
-
original: "| Permission | {Required permission code or role} |"
|
|
479
|
-
new: "| Permission | system:user:query |"
|
|
480
|
-
```
|
|
481
|
-
|
|
482
|
-
**Fill Request Parameters Table:**
|
|
483
|
-
|
|
484
|
-
Replace placeholder rows with actual parameters:
|
|
485
|
-
|
|
486
|
-
```
|
|
487
|
-
original: "| {param1} | {String/Integer/Long} | {Yes/No} | {Description} | {e.g., Length 1-50, Not blank} |"
|
|
488
|
-
new: "| username | String | No | ็จๆทๅ | Length 1-50 |"
|
|
489
|
-
```
|
|
490
|
-
|
|
491
|
-
**Fill Response Data Table:**
|
|
492
|
-
|
|
493
|
-
Replace placeholder rows with actual response fields:
|
|
494
|
-
|
|
495
|
-
```
|
|
496
|
-
original: "| {id} | {Long} | {Record ID} | {No} |"
|
|
497
|
-
new: "| id | Long | ็จๆทID | No |"
|
|
498
|
-
```
|
|
499
|
-
|
|
500
|
-
**Fill Error Codes Table:**
|
|
501
|
-
|
|
502
|
-
```
|
|
503
|
-
original: "| {ERR_001} | {Error description} | {When this error occurs} |"
|
|
504
|
-
new: "| 400 | ๅๆฐๆ ก้ชๅคฑ่ดฅ | ่ฏทๆฑๅๆฐไธๅๆณ |"
|
|
505
|
-
```
|
|
506
|
-
|
|
507
|
-
**Fill Business Flow Mermaid Diagram:**
|
|
508
|
-
|
|
509
|
-
Replace the entire example Mermaid block with actual business flow:
|
|
510
|
-
|
|
511
|
-
```
|
|
512
|
-
original: "```mermaid\ngraph TB\n Start([Request Received]) --> Auth{Permission Check}\n ... (ๆดไธช็คบไพๅพ)\n```"
|
|
513
|
-
new: "```mermaid\ngraph TB\n Start([่ฏทๆฑๅฐ่พพ]) --> Auth{ๆ้ๆฃๆฅ}\n Auth -->|ๆ ๆ้| Err403[่ฟๅ403]\n ...\n```"
|
|
514
|
-
```
|
|
515
|
-
|
|
516
|
-
**Fill Flow Step Description Table:**
|
|
517
|
-
|
|
518
|
-
```
|
|
519
|
-
original: "| 1 | Permission Check | Controller | {Controller} | Request + Token | Permission result | Return 403 |"
|
|
520
|
-
new: "| 1 | ๆ้ๆฃๆฅ | Controller | UserController | Request + Token | ๆ้ๆ ก้ช็ปๆ | ่ฟๅ403 |"
|
|
521
|
-
```
|
|
522
|
-
|
|
523
|
-
**Fill Detailed Call Chain Table:**
|
|
524
|
-
|
|
525
|
-
```
|
|
526
|
-
original: "| 1 | Controller | {UserController} | {createUser} | Receive request, validate params, call service | [Source]({dynamic_prefix}{controllerSourcePath}) |"
|
|
527
|
-
new: "| 1 | Controller | UserController | createUser | ๆฅๆถ่ฏทๆฑ๏ผๆ ก้ชๅๆฐ๏ผ่ฐ็จๆๅก | [Source](../../../../../yudao-module-system/.../UserController.java) |"
|
|
528
|
-
// ๆณจ๏ผdynamic_prefix ้ๆ นๆฎๆๆกฃ่ทฏๅพๅจๆ่ฎก็ฎ๏ผ็คบไพๅ่ฎพๆๆกฃๅจ admin-api/system/user/ (6ๅฑ)
|
|
529
|
-
```
|
|
530
|
-
|
|
531
|
-
**Fill Database Operations Table:**
|
|
532
|
-
|
|
533
|
-
```
|
|
534
|
-
original: "| {INSERT} | {user} | {INSERT} | {Insert new user record} |"
|
|
535
|
-
new: "| INSERT | system_user | INSERT | ๆๅ
ฅๆฐ็จๆท่ฎฐๅฝ |"
|
|
536
|
-
```
|
|
537
|
-
|
|
538
|
-
**Fill Transaction Boundaries Table:**
|
|
539
|
-
|
|
540
|
-
```
|
|
541
|
-
original: "| {UserService.createUser} | {User + UserRole} | {READ_COMMITTED} | {Atomic operation} |"
|
|
542
|
-
new: "| UserService.createUser | system_user + system_user_role | READ_COMMITTED | ๅๅญๆไฝ |"
|
|
543
|
-
```
|
|
544
|
-
|
|
545
|
-
---
|
|
546
|
-
|
|
547
|
-
#### Section 3: Data Field Definition
|
|
548
|
-
|
|
549
|
-
**Locate anchor:** `<!-- AI-TAG: DATA_DEFINITION -->`
|
|
550
|
-
|
|
551
|
-
**Fill Database Table Structure:**
|
|
552
|
-
|
|
553
|
-
```
|
|
554
|
-
original: "**Table Name:** {table_name}"
|
|
555
|
-
new: "**Table Name:** system_user"
|
|
556
|
-
|
|
557
|
-
original: "| {id} | {Long} | {BIGINT} | {20} | {No} | {Auto increment} | {PRIMARY KEY} | {PRIMARY} | {Primary key} |"
|
|
558
|
-
new: "| id | Long | BIGINT | 20 | No | Auto increment | PRIMARY KEY | PRIMARY | ไธป้ฎID |"
|
|
559
|
-
```
|
|
560
|
-
|
|
561
|
-
**Fill Indexes Table:**
|
|
562
|
-
|
|
563
|
-
```
|
|
564
|
-
original: "| {idx_name} | {INDEX} | {field1} | {Query optimization} |"
|
|
565
|
-
new: "| idx_username | UNIQUE | username | ็จๆทๅๅฏไธ็ดขๅผ |"
|
|
566
|
-
```
|
|
567
|
-
|
|
568
|
-
**Fill Relationships Table:**
|
|
569
|
-
|
|
570
|
-
```
|
|
571
|
-
original: "| {related_table} | {One-to-Many} | {this_table.related_id} | {Relationship description} |"
|
|
572
|
-
new: "| system_user_role | One-to-Many | system_user.id = system_user_role.user_id | ็จๆท่ง่ฒๅ
ณ่ |"
|
|
573
|
-
```
|
|
574
|
-
|
|
575
|
-
---
|
|
576
|
-
|
|
577
|
-
#### Section 4: References
|
|
578
|
-
|
|
579
|
-
**Locate anchor:** `<!-- AI-TAG: REFERENCES -->`
|
|
580
|
-
|
|
581
|
-
**Fill Internal Services Table:**
|
|
582
|
-
|
|
583
|
-
```
|
|
584
|
-
original: "| {ServiceName} | {e.g., User business logic} | [Source]({dynamic_prefix}{serviceSourcePath}) |"
|
|
585
|
-
new: "| UserService | ็จๆทไธๅก้ป่พๅค็ | [Source](../../../../../yudao-module-system/.../UserService.java) |"
|
|
586
|
-
// ๆณจ๏ผdynamic_prefix ้ๆ นๆฎๆๆกฃ่ทฏๅพๅจๆ่ฎก็ฎ
|
|
587
|
-
```
|
|
588
|
-
|
|
589
|
-
**Fill Data Access Layer Table:**
|
|
590
|
-
|
|
591
|
-
```
|
|
592
|
-
original: "| {MapperName} | {EntityName} | {e.g., User CRUD operations} | [Source]({dynamic_prefix}{mapperSourcePath}) |"
|
|
593
|
-
new: "| UserMapper | UserDO | ็จๆทCRUDๆไฝ | [Source](../../../../../yudao-module-system/.../UserMapper.java) |"
|
|
594
|
-
// ๆณจ๏ผdynamic_prefix ้ๆ นๆฎๆๆกฃ่ทฏๅพๅจๆ่ฎก็ฎ
|
|
595
|
-
```
|
|
596
|
-
|
|
597
|
-
**Fill DTOs and Entities Table:**
|
|
598
|
-
|
|
599
|
-
```
|
|
600
|
-
original: "| {DTOClass} | Request DTO | {e.g., Create user request} | [Source]({dynamic_prefix}{dtoSourcePath}) |"
|
|
601
|
-
new: "| UserCreateReqVO | Request DTO | ๅๅปบ็จๆท่ฏทๆฑ | [Source](../../../../../yudao-module-system/.../UserCreateReqVO.java) |"
|
|
602
|
-
// ๆณจ๏ผdynamic_prefix ้ๆ นๆฎๆๆกฃ่ทฏๅพๅจๆ่ฎก็ฎ
|
|
603
|
-
```
|
|
604
|
-
|
|
605
|
-
**Fill API Consumers Table:**
|
|
606
|
-
|
|
607
|
-
```
|
|
608
|
-
original: "| {PageName} | {e.g., User management list page} | [Source]({dynamic_prefix}{pageSourcePath}) | [Doc]({dynamic_prefix}{pageDocumentPath}) |"
|
|
609
|
-
new: "| ็จๆท็ฎก็้กต้ข | ็จๆทๅ่กจๅฑ็คบไธ็ฎก็ | [Source](../../../../../yudao-ui-admin/src/views/system/user/index.vue) | [Doc](../../../../../speccrew-workspace/knowledges/bizs/web-vue3/src/views/system/user/index.md) |"
|
|
610
|
-
// ๆณจ๏ผdynamic_prefix ้ๆ นๆฎๆๆกฃ่ทฏๅพๅจๆ่ฎก็ฎ๏ผSourceๅDoc้พๆฅไฝฟ็จ็ธๅ็ๅ็ผ่ฎก็ฎๆนๆณ
|
|
611
|
-
```
|
|
612
|
-
|
|
613
|
-
---
|
|
614
|
-
|
|
615
|
-
#### Section 5: Business Rule Constraints
|
|
616
|
-
|
|
617
|
-
**Locate anchor:** `<!-- AI-TAG: BUSINESS_RULES -->`
|
|
618
|
-
|
|
619
|
-
**Fill Permission Rules Table:**
|
|
620
|
-
|
|
621
|
-
```
|
|
622
|
-
original: "| {GET /page} | Have {permission code} permission | Return 403 Forbidden |"
|
|
623
|
-
new: "| GET /page | ้่ฆ system:user:query ๆ้ | ่ฟๅ 403 Forbidden |"
|
|
624
|
-
```
|
|
625
|
-
|
|
626
|
-
**Fill Business Logic Rules:**
|
|
627
|
-
|
|
628
|
-
```
|
|
629
|
-
original: "1. **{Rule 1}**: {e.g., User name must be unique across system}"
|
|
630
|
-
new: "1. **็จๆทๅๅฏไธๆง**: ็จๆทๅๅจ็ณป็ปไธญๅฟ
้กปๅฏไธ๏ผไธ่ฝ้ๅค"
|
|
631
|
-
```
|
|
632
|
-
|
|
633
|
-
**Fill Validation Rules Table:**
|
|
634
|
-
|
|
635
|
-
```
|
|
636
|
-
original: "| Parameter validation | {Field} cannot be empty | Return 400 Bad Request | ERR_001 |"
|
|
637
|
-
new: "| ๅๆฐๆ ก้ช | ็จๆทๅไธ่ฝไธบ็ฉบ | ่ฟๅ 400 Bad Request | 400 |"
|
|
638
|
-
```
|
|
639
|
-
|
|
640
|
-
---
|
|
641
|
-
|
|
642
|
-
#### Section 6: Dependency Analysis
|
|
643
|
-
|
|
644
|
-
**Locate anchor:** `<!-- AI-TAG: DEPENDENCIES -->`
|
|
645
|
-
|
|
646
|
-
**Fill Module Dependencies Table:**
|
|
647
|
-
|
|
648
|
-
```
|
|
649
|
-
original: "| {Module A} | Strong | {Purpose description} | {Impact when unavailable} |"
|
|
650
|
-
new: "| system | Strong | ็จๆทๆ้ๆ ก้ช | ๆ้ๅ่ฝไธๅฏ็จ |"
|
|
651
|
-
```
|
|
652
|
-
|
|
653
|
-
**Fill Service Dependencies Mermaid:**
|
|
654
|
-
|
|
655
|
-
Replace example diagram with actual dependencies:
|
|
656
|
-
|
|
657
|
-
```
|
|
658
|
-
original: "```mermaid\ngraph LR\n A[This Feature] --> B[Dependency Service 1]\n ...\n```"
|
|
659
|
-
new: "```mermaid\ngraph LR\n A[UserController] --> B[UserService]\n B --> C[UserMapper]\n ...\n```"
|
|
660
|
-
```
|
|
661
|
-
|
|
662
|
-
**Fill External Dependencies Table:**
|
|
663
|
-
|
|
664
|
-
```
|
|
665
|
-
original: "| {Payment Gateway} | REST API | {Payment processing} | {Queue and retry} |"
|
|
666
|
-
new: "| N/A | N/A | ๆ ๅค้จไพ่ต | N/A |"
|
|
667
|
-
```
|
|
668
|
-
|
|
669
|
-
---
|
|
670
|
-
|
|
671
|
-
#### Section 7: Performance Considerations
|
|
672
|
-
|
|
673
|
-
**Locate anchor:** `<!-- AI-TAG: PERFORMANCE -->`
|
|
674
|
-
|
|
675
|
-
**Fill Performance Bottlenecks Table:**
|
|
676
|
-
|
|
677
|
-
```
|
|
678
|
-
original: "| {List query} | {Large data volume} | {Add index, pagination} | High |"
|
|
679
|
-
new: "| ๅ้กตๆฅ่ฏข | ๅคงๆฐๆฎ้ๆถๆง่ฝไธ้ | ๆทปๅ ็ดขๅผ๏ผๅผบๅถๅ้กต | High |"
|
|
680
|
-
```
|
|
681
|
-
|
|
682
|
-
**Fill Index Suggestions Table:**
|
|
683
|
-
|
|
684
|
-
```
|
|
685
|
-
original: "| {table_name} | {field1, field2} | {COMPOSITE INDEX} | {Query optimization} |"
|
|
686
|
-
new: "| system_user | username, status | INDEX | ็จๆทๅๅ็ถๆ่ๅๆฅ่ฏขไผๅ |"
|
|
687
|
-
```
|
|
688
|
-
|
|
689
|
-
**Fill Caching Strategy Table:**
|
|
690
|
-
|
|
691
|
-
```
|
|
692
|
-
original: "| {User info} | {Redis} | {30 minutes} | {Write-through} |"
|
|
693
|
-
new: "| ็จๆทไฟกๆฏ | Redis | 30 minutes | ๅ็ฉฟ้ |"
|
|
694
|
-
```
|
|
695
|
-
|
|
696
|
-
**Fill Transaction Boundaries Table:**
|
|
697
|
-
|
|
698
|
-
```
|
|
699
|
-
original: "| {Create order} | {Order + Details} | {READ_COMMITTED} | {30 seconds} |"
|
|
700
|
-
new: "| ๅๅปบ็จๆท | system_user + system_user_role | READ_COMMITTED | 30 seconds |"
|
|
701
|
-
```
|
|
702
|
-
|
|
703
|
-
---
|
|
704
|
-
|
|
705
|
-
#### Section 8: Troubleshooting Guide
|
|
706
|
-
|
|
707
|
-
**Locate anchor:** `<!-- AI-TAG: TROUBLESHOOTING -->`
|
|
708
|
-
|
|
709
|
-
**Fill Common Issues Table:**
|
|
710
|
-
|
|
711
|
-
```
|
|
712
|
-
original: "| {Query timeout} | {Missing index} | {Check execution plan} | {Add index} |"
|
|
713
|
-
new: "| ๆฅ่ฏข่ถ
ๆถ | ็ผบๅฐ็ดขๅผ | ๆฃๆฅๆง่ก่ฎกๅ | ๆทปๅ ็ดขๅผ |"
|
|
714
|
-
```
|
|
715
|
-
|
|
716
|
-
**Fill Error Code Reference Table:**
|
|
717
|
-
|
|
718
|
-
```
|
|
719
|
-
original: "| ERR_001 | {Required field empty} | {Form submission} | {Check required fields} |"
|
|
720
|
-
new: "| 400 | ๅๆฐๆ ก้ชๅคฑ่ดฅ | ่กจๅๆไบค | ๆฃๆฅๅฟ
ๅกซๅญๆฎต |"
|
|
721
|
-
```
|
|
722
|
-
|
|
723
|
-
**Fill Key Log Points Table:**
|
|
724
|
-
|
|
725
|
-
```
|
|
726
|
-
original: "| {Service layer} | ERROR | {Exception stack trace} | {Locate error root cause} |"
|
|
727
|
-
new: "| UserService | ERROR | ๅผๅธธๅ ๆ ไฟกๆฏ | ๅฎไฝ้่ฏฏๆ นๅ |"
|
|
728
|
-
```
|
|
729
|
-
|
|
730
|
-
---
|
|
731
|
-
|
|
732
|
-
#### Section 9: Notes and Additional Information
|
|
733
|
-
|
|
734
|
-
**Locate anchor:** `<!-- AI-TAG: ADDITIONAL_NOTES -->`
|
|
735
|
-
|
|
736
|
-
**Fill Pending Confirmations:**
|
|
737
|
-
|
|
738
|
-
```
|
|
739
|
-
original: "- [ ] **{Pending 1}**: {e.g., Whether product category dropdown needs to support fuzzy search}"
|
|
740
|
-
new: "- [ ] **ๅพ
็กฎ่ฎค1**: ๆฏๅฆ้่ฆๆฏๆๆน้ๅฏผๅบ็จๆทๆฐๆฎ"
|
|
741
|
-
```
|
|
742
|
-
|
|
743
|
-
---
|
|
744
|
-
|
|
745
|
-
#### Section 10: Appendix
|
|
746
|
-
|
|
747
|
-
Fill Best Practices and Configuration Examples based on analysis:
|
|
748
|
-
|
|
749
|
-
```
|
|
750
|
-
original: "- {Best practice 1: e.g., Use batch operations for large datasets}"
|
|
751
|
-
new: "- ๆน้ๆไฝ็จๆทๆถไฝฟ็จไบๅก็กฎไฟๆฐๆฎไธ่ดๆง"
|
|
752
|
-
```
|
|
388
|
+
#### Section 1-10: Fill Template Sections
|
|
389
|
+
|
|
390
|
+
Fill each section using `search_replace` with extracted data from source code analysis.
|
|
391
|
+
|
|
392
|
+
**Template Anchors:**
|
|
393
|
+
| Section | Anchor |
|
|
394
|
+
|---------|--------|
|
|
395
|
+
| 1. Content Overview | `<!-- AI-TAG: OVERVIEW -->` |
|
|
396
|
+
| 2. API Endpoints | `<!-- AI-TAG: API_ENDPOINTS -->` |
|
|
397
|
+
| 3. Data Fields | `<!-- AI-TAG: DATA_DEFINITION -->` |
|
|
398
|
+
| 4. References | `<!-- AI-TAG: REFERENCES -->` |
|
|
399
|
+
| 5. Business Rules | `<!-- AI-TAG: BUSINESS_RULES -->` |
|
|
400
|
+
| 6. Dependencies | `<!-- AI-TAG: DEPENDENCIES -->` |
|
|
401
|
+
| 7. Performance | `<!-- AI-TAG: PERFORMANCE -->` |
|
|
402
|
+
| 8. Troubleshooting | `<!-- AI-TAG: TROUBLESHOOTING -->` |
|
|
403
|
+
| 9. Notes | `<!-- AI-TAG: ADDITIONAL_NOTES -->` |
|
|
404
|
+
| 10. Appendix | End of document |
|
|
405
|
+
|
|
406
|
+
**Filling Guidelines:**
|
|
407
|
+
- Replace placeholder text with actual data extracted from source code
|
|
408
|
+
- Use the template's existing table structure
|
|
409
|
+
- Fill ALL tables, use "N/A" for unavailable data
|
|
410
|
+
- Generate Mermaid business flow diagrams for each API endpoint
|
|
411
|
+
- Preserve section headers and numbering
|
|
753
412
|
|
|
754
413
|
---
|
|
755
414
|
|
|
@@ -868,132 +527,35 @@ Write analysis results to marker files for dispatch batch processing.
|
|
|
868
527
|
- [ ] `.done.json` JSON: `fileName` does NOT contain file extension
|
|
869
528
|
- [ ] `.done.json` JSON: `sourceFile` matches `features-{platform}.json` pattern
|
|
870
529
|
- [ ] `.done.json` JSON: `module` field is present and non-empty
|
|
871
|
-
- [ ]
|
|
872
|
-
- [ ] `.graph.json` JSON: `nodes` and `edges` are arrays (can be empty)
|
|
873
|
-
- [ ] Both files: valid JSON (no trailing commas, all strings quoted)
|
|
530
|
+
- [ ] Valid JSON (no trailing commas, all strings quoted)
|
|
874
531
|
|
|
875
532
|
---
|
|
876
533
|
|
|
877
|
-
###
|
|
878
|
-
|
|
879
|
-
**โ
CORRECT Format - MUST USE:**
|
|
880
|
-
```
|
|
881
|
-
{completed_dir}/{module}-{subpath}-{fileName}.done.json โ Completion status marker (JSON format)
|
|
882
|
-
{completed_dir}/{module}-{subpath}-{fileName}.graph.json โ Graph data marker (JSON format)
|
|
883
|
-
```
|
|
884
|
-
|
|
885
|
-
**Naming Rule Explanation:**
|
|
886
|
-
|
|
887
|
-
The marker filename MUST follow the composite naming pattern `{module}-{subpath}-{fileName}` to prevent conflicts between same-named source files.
|
|
888
|
-
|
|
889
|
-
**How to Extract Each Component from `{{sourcePath}}`:**
|
|
890
|
-
|
|
891
|
-
1. **module**: Use `{{module}}` input variable directly (e.g., `system`, `trade`, `ai`)
|
|
892
|
-
|
|
893
|
-
2. **subpath**: Extract the middle path between the module package root and the controller file:
|
|
894
|
-
- For Java: Remove package prefix up to the business layer (e.g., `controller/admin/`, `controller/app/`)
|
|
895
|
-
- Remove the file name at the end
|
|
896
|
-
- Replace path separators (`/`) with hyphens (`-`)
|
|
897
|
-
- If the file is at the module root directory, subpath will be empty โ omit from filename
|
|
898
|
-
|
|
899
|
-
3. **fileName**: Use `{{fileName}}` input variable (Java class name WITHOUT `.java` extension)
|
|
900
|
-
|
|
901
|
-
**Examples:**
|
|
534
|
+
### Marker File Naming Convention
|
|
902
535
|
|
|
903
|
-
|
|
904
|
-
|------------|--------|---------|----------|-----------------|
|
|
905
|
-
| `yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/NotifyMessageController.java` | `system` | `controller-admin-notify` | `NotifyMessageController` | `system-controller-admin-notify-NotifyMessageController.done.json` |
|
|
906
|
-
| `yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserController.java` | `system` | `controller-admin-user` | `UserController` | `system-controller-admin-user-UserController.done.json` |
|
|
907
|
-
| `yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/chat/ChatConversationController.java` | `ai` | `controller-admin-chat` | `ChatConversationController` | `ai-controller-admin-chat-ChatConversationController.done.json` |
|
|
536
|
+
**Format:** `{completed_dir}/{module}-{subpath}-{fileName}.done.json`
|
|
908
537
|
|
|
909
|
-
**
|
|
910
|
-
-
|
|
911
|
-
-
|
|
538
|
+
**Components:**
|
|
539
|
+
- `module`: Use `{{module}}` input variable
|
|
540
|
+
- `subpath`: Extract from sourcePath, replace `/` with `-` (e.g., `controller/admin/user` โ `controller-admin-user`)
|
|
541
|
+
- `fileName`: `{{fileName}}` WITHOUT extension
|
|
912
542
|
|
|
913
|
-
**
|
|
914
|
-
- `d:/dev/speccrew/speccrew-workspace/knowledges/base/sync-state/knowledge-bizs/completed/system-controller-admin-notify-NotifyMessageController.done.json`
|
|
915
|
-
- `d:/dev/speccrew/speccrew-workspace/knowledges/base/sync-state/knowledge-bizs/completed/ai-controller-admin-chat-ChatConversationController.graph.json`
|
|
543
|
+
**Example:** `system-controller-admin-user-UserController.done.json`
|
|
916
544
|
|
|
917
|
-
|
|
918
|
-
```
|
|
919
|
-
{fileName}.done.json โ WRONG: missing module and subpath (causes conflicts)
|
|
920
|
-
{fileName}.graph.json โ WRONG: missing module and subpath (causes conflicts)
|
|
921
|
-
{module}-{fileName}.done.json โ WRONG: missing subpath (may still conflict)
|
|
922
|
-
{fileName}.completed.json โ WRONG extension
|
|
923
|
-
{fileName}.done โ WRONG extension (missing .json)
|
|
924
|
-
{fileName}_done.json โ WRONG separator and extension
|
|
925
|
-
```
|
|
926
|
-
|
|
927
|
-
**โ WRONG Filename Examples - NEVER USE:**
|
|
928
|
-
- `UserController.done.json` - WRONG: missing module and subpath (conflicts with other `UserController.java` files)
|
|
929
|
-
- `system-UserController.done.json` - WRONG: missing subpath (if file is in `controller/admin/user/`)
|
|
930
|
-
- `UserController.completed.json` - WRONG: uses `.completed.json` instead of `.done.json`
|
|
931
|
-
- `UserController_done.json` - WRONG: uses underscore and wrong extension
|
|
545
|
+
> **Note:** Graph data (`.graph.json`) files are generated by `speccrew-knowledge-bizs-api-graph` Skill.
|
|
932
546
|
|
|
933
547
|
---
|
|
934
548
|
|
|
935
|
-
###
|
|
936
|
-
|
|
937
|
-
**Path Variables:**
|
|
938
|
-
- `{{completed_dir}}` - Absolute path to marker files directory (passed from dispatch)
|
|
939
|
-
- `{{sourcePath}}` - Relative path to source file (from features JSON)
|
|
940
|
-
- `{{documentPath}}` - Relative path to generated document (from features JSON)
|
|
941
|
-
|
|
942
|
-
**Path Format Requirements:**
|
|
943
|
-
|
|
944
|
-
| Field | Format | Example |
|
|
945
|
-
|-------|--------|---------|
|
|
946
|
-
| `sourcePath` in `.done` | Relative path (as-is from input) | `yudao-module-system/.../UserController.java` |
|
|
947
|
-
| `documentPath` in `.done` | Relative path (as-is from input) | `speccrew-workspace/knowledges/bizs/admin-api/system/user/UserController.md` |
|
|
948
|
-
| `sourcePath` in `.graph.json` nodes | Relative path (as-is from input) | `yudao-module-system/.../UserController.java` |
|
|
949
|
-
| `documentPath` in `.graph.json` nodes | Relative path (as-is from input) | `speccrew-workspace/knowledges/bizs/admin-api/system/user/UserController.md` |
|
|
950
|
-
|
|
951
|
-
**โ ๏ธ CRITICAL: NEVER convert relative paths to absolute paths in the JSON content!**
|
|
952
|
-
|
|
953
|
-
**Correct vs Wrong Example:**
|
|
954
|
-
```json
|
|
955
|
-
// โ
CORRECT - .done file content:
|
|
956
|
-
{
|
|
957
|
-
"fileName": "UserController",
|
|
958
|
-
"sourcePath": "yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserController.java",
|
|
959
|
-
"sourceFile": "features-admin-api.json",
|
|
960
|
-
"module": "system",
|
|
961
|
-
"status": "success",
|
|
962
|
-
"analysisNotes": "Successfully analyzed UserController"
|
|
963
|
-
}
|
|
549
|
+
### Path Format Rules
|
|
964
550
|
|
|
965
|
-
|
|
966
|
-
{
|
|
967
|
-
"fileName": "UserController",
|
|
968
|
-
"sourcePath": "d:/dev/project/yudao-module-system/.../UserController.java", โ WRONG: absolute path
|
|
969
|
-
"sourceFile": "features-admin-api.json",
|
|
970
|
-
"module": "system",
|
|
971
|
-
"status": "success"
|
|
972
|
-
}
|
|
973
|
-
```
|
|
551
|
+
**โ ๏ธ CRITICAL: ALWAYS use relative paths in JSON content, NEVER absolute paths.**
|
|
974
552
|
|
|
975
553
|
---
|
|
976
554
|
|
|
977
|
-
**1. Write .done.json file
|
|
555
|
+
**1. Write .done.json file:**
|
|
978
556
|
|
|
979
|
-
|
|
980
|
-
>
|
|
981
|
-
> **โ FORBIDDEN - NEVER DO THIS:**
|
|
982
|
-
> ```
|
|
983
|
-
> Scanning files...
|
|
984
|
-
> Analysis complete
|
|
985
|
-
> ```
|
|
986
|
-
>
|
|
987
|
-
> **โ
CORRECT - ONLY VALID JSON:**
|
|
988
|
-
> ```json
|
|
989
|
-
> {"fileName": "UserController", "status": "success", ...}
|
|
990
|
-
> ```
|
|
557
|
+
Create valid JSON file at `{completed_dir}/{module}-{subpath}-{fileName}.done.json`:
|
|
991
558
|
|
|
992
|
-
Use the Write tool to create file at `{{completed_dir}}/{module}-{subpath}-{fileName}.done.json`:
|
|
993
|
-
|
|
994
|
-
**Full path example:** `d:/dev/speccrew/speccrew-workspace/knowledges/base/sync-state/knowledge-bizs/completed/system-controller-admin-user-UserController.done.json`
|
|
995
|
-
|
|
996
|
-
**Complete JSON Template (ALL fields required):**
|
|
997
559
|
```json
|
|
998
560
|
{
|
|
999
561
|
"fileName": "{{fileName}}",
|
|
@@ -1006,155 +568,30 @@ Use the Write tool to create file at `{{completed_dir}}/{module}-{subpath}-{file
|
|
|
1006
568
|
}
|
|
1007
569
|
```
|
|
1008
570
|
|
|
1009
|
-
**
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
| `sourcePath` | โ
YES | Relative path to source file | `"yudao-module-system/.../UserController.java"` |
|
|
1014
|
-
| `sourceFile` | โ
YES | Source features JSON filename | `"features-admin-api.json"` |
|
|
1015
|
-
| `module` | โ
YES | Business module name | `"system"` |
|
|
1016
|
-
| `documentPath` | โ
YES | Path to generated document (same as Step 5a) | `"speccrew-workspace/knowledges/bizs/admin-api/system/user/UserController.md"` |
|
|
1017
|
-
| `status` | โ
YES | Analysis status | `"success"`, `"partial"`, or `"failed"` |
|
|
1018
|
-
| `analysisNotes` | โ
YES | Summary message | `"Analyzed 8 API endpoints"` |
|
|
1019
|
-
|
|
1020
|
-
> **โ ๏ธ CRITICAL - fileName Field Rules:**
|
|
1021
|
-
> - The `fileName` field MUST contain only the Java class name **WITHOUT file extension**
|
|
1022
|
-
> - โ
CORRECT: `"fileName": "UserController"`
|
|
1023
|
-
> - โ
CORRECT: `"fileName": "AiKnowledgeDocumentCreateListReqVO"`
|
|
1024
|
-
> - โ WRONG: `"fileName": "UserController.java"` (includes extension)
|
|
1025
|
-
> - โ WRONG: `"fileName": "UserController.class"` (includes extension)
|
|
1026
|
-
|
|
1027
|
-
> **โ ๏ธ CRITICAL**: The `sourceFile` field is MANDATORY. It MUST be the features JSON filename (e.g., `features-admin-api.json`). Missing this field will cause pipeline failure.
|
|
1028
|
-
|
|
1029
|
-
> **โ ๏ธ CRITICAL**: The `documentPath` field is MANDATORY. It MUST match the `{{documentPath}}` variable from Step 5a. This is used to verify the document was created successfully.
|
|
1030
|
-
|
|
1031
|
-
โ ๏ธ **CRITICAL NAMING RULE:** Filename MUST be `{module}-{subpath}-{fileName}.done.json` to prevent conflicts between same-named files.
|
|
1032
|
-
- โ
CORRECT: `system-controller-admin-user-UserController.done.json` (full composite naming)
|
|
1033
|
-
- โ
CORRECT: `ai-controller-admin-chat-ChatConversationController.done.json` (full composite naming)
|
|
1034
|
-
- โ
CORRECT: `system-SystemController.done.json` (when subpath is empty, controller at root)
|
|
1035
|
-
- โ WRONG: `UserController.done.json` (missing module and subpath - will conflict)
|
|
1036
|
-
- โ WRONG: `UserController.done` (missing .json extension)
|
|
1037
|
-
- โ WRONG: `system-UserController.done.json` (missing subpath when controller is in nested package)
|
|
1038
|
-
|
|
1039
|
-
โ ๏ธ **CRITICAL:** The file MUST contain valid JSON content. Empty files or files with only whitespace will cause processing failures.
|
|
1040
|
-
|
|
1041
|
-
**2. Write .graph.json file (MANDATORY):**
|
|
1042
|
-
|
|
1043
|
-
> **โ ๏ธ CRITICAL FORMAT REQUIREMENT**: The `.graph.json` file MUST be valid JSON and **MUST include the root-level `module` field**. Do NOT rely on scripts to infer the module from `.done` file - the `module` field MUST be explicitly present at the root level of `.graph.json`.
|
|
1044
|
-
|
|
1045
|
-
Use the Write tool to create file at `{{completed_dir}}/{module}-{subpath}-{fileName}.graph.json`:
|
|
1046
|
-
|
|
1047
|
-
**Full path example:** `d:/dev/speccrew/speccrew-workspace/knowledges/base/sync-state/knowledge-bizs/completed/system-controller-admin-user-UserController.graph.json`
|
|
1048
|
-
|
|
1049
|
-
```json
|
|
1050
|
-
{
|
|
1051
|
-
"module": "{{module}}",
|
|
1052
|
-
"nodes": [
|
|
1053
|
-
{
|
|
1054
|
-
"id": "api-{{module}}-{{endpoint-name}}",
|
|
1055
|
-
"type": "api",
|
|
1056
|
-
"name": "<display name>",
|
|
1057
|
-
"module": "{{module}}",
|
|
1058
|
-
"sourcePath": "{{sourcePath}}",
|
|
1059
|
-
"documentPath": "{{documentPath}}",
|
|
1060
|
-
"description": "..."
|
|
1061
|
-
}
|
|
1062
|
-
],
|
|
1063
|
-
"edges": [
|
|
1064
|
-
{
|
|
1065
|
-
"source": "api-...",
|
|
1066
|
-
"target": "service-... or table-...",
|
|
1067
|
-
"type": "operates|invokes|references|depends-on|maps-to",
|
|
1068
|
-
"metadata": { ... }
|
|
1069
|
-
}
|
|
1070
|
-
]
|
|
1071
|
-
}
|
|
1072
|
-
```
|
|
1073
|
-
|
|
1074
|
-
> **โ ๏ธ CRITICAL - module Field Requirement:**
|
|
1075
|
-
> - The `.graph.json` file **MUST** have a root-level `module` field
|
|
1076
|
-
> - Do NOT assume scripts will fall back to reading from `.done` file
|
|
1077
|
-
> - Missing `module` field will cause the graph merge pipeline to reject this file
|
|
1078
|
-
|
|
1079
|
-
โ ๏ธ **CRITICAL NAMING RULE:** Filename MUST be `{module}-{subpath}-{fileName}.graph.json` to prevent conflicts between same-named files.
|
|
1080
|
-
- โ
CORRECT: `system-controller-admin-user-UserController.graph.json` (full composite naming)
|
|
1081
|
-
- โ
CORRECT: `ai-controller-admin-chat-ChatConversationController.graph.json` (full composite naming)
|
|
1082
|
-
- โ
CORRECT: `system-SystemController.graph.json` (when subpath is empty, controller at root)
|
|
1083
|
-
- โ WRONG: `UserController.graph.json` (missing module and subpath - will conflict)
|
|
1084
|
-
- โ WRONG: `dict-UserController.graph.json` (using old featureId format)
|
|
1085
|
-
- โ WRONG: `system-UserController.graph.json` (missing subpath when controller is in nested package)
|
|
1086
|
-
|
|
1087
|
-
โ ๏ธ **CRITICAL:** The file MUST contain valid JSON content. Empty files or files with only whitespace will cause processing failures.
|
|
571
|
+
> **CRITICAL:**
|
|
572
|
+
> - `fileName` MUST NOT include file extension
|
|
573
|
+
> - All paths MUST be relative, not absolute
|
|
574
|
+
> - Content MUST be valid JSON (not plain text)
|
|
1088
575
|
|
|
1089
|
-
**
|
|
1090
|
-
Before writing the graph.json file, verify:
|
|
1091
|
-
- [ ] ALL public API endpoint methods in the controller are represented as `api` nodes
|
|
1092
|
-
- [ ] Status update endpoints (updateStatus, toggleEnable) are included
|
|
1093
|
-
- [ ] Special operation endpoints (resetPassword, export, import, batch operations) are included
|
|
1094
|
-
- [ ] Each `api` node has proper metadata with HTTP method and path
|
|
1095
|
-
- [ ] No public endpoint method is left without a corresponding node
|
|
576
|
+
**Output:** "Step 7 Status: โ
COMPLETED - Marker file written to {{completed_dir}}"
|
|
1096
577
|
|
|
1097
|
-
|
|
1098
|
-
- `api`: API็ซฏ็น
|
|
1099
|
-
- `service`: Service็ฑป
|
|
1100
|
-
- `table`: ๆฐๆฎๅบ่กจ
|
|
1101
|
-
- `dto`: ๆฐๆฎไผ ่พๅฏน่ฑก
|
|
578
|
+
> **Note:** Graph data (`.graph.json`) construction is handled by `speccrew-knowledge-bizs-api-graph` Skill. This step only writes the completion marker.
|
|
1102
579
|
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
**โ ๏ธ IMPORTANT: If this step fails, the dispatch script will NOT be able to process your analysis results. You MUST ensure both marker files are written successfully.**
|
|
580
|
+
**โ ๏ธ IMPORTANT: If this step fails, the dispatch script will NOT be able to process your analysis results. You MUST ensure the marker file is written successfully.**
|
|
1106
581
|
|
|
1107
582
|
## Reference Guides
|
|
1108
583
|
|
|
1109
584
|
### Mermaid Guide
|
|
1110
585
|
|
|
1111
|
-
When generating Mermaid diagrams, follow
|
|
1112
|
-
|
|
586
|
+
When generating Mermaid diagrams, follow compatibility guidelines:
|
|
1113
587
|
- Use `graph TB` or `graph LR` syntax (not `flowchart`)
|
|
1114
588
|
- No parentheses `()` in node text
|
|
1115
589
|
- No HTML tags like `<br/>`
|
|
1116
590
|
- No `style` definitions
|
|
1117
|
-
- No nested `subgraph`
|
|
1118
|
-
- No special characters in node text
|
|
1119
|
-
|
|
1120
|
-
### Business Flow Diagram Guidelines
|
|
1121
|
-
|
|
1122
|
-
When generating business flow diagrams in feature documents, follow these principles:
|
|
1123
|
-
|
|
1124
|
-
**Business Flow vs Technical Call Chain:**
|
|
1125
|
-
|
|
1126
|
-
| Aspect | Business Flow (Target) | Technical Call Chain (Avoid) |
|
|
1127
|
-
|--------|----------------------|---------------------------|
|
|
1128
|
-
| Focus | What business operations happen | What technical components are involved |
|
|
1129
|
-
| Audience | Product managers, solution architects | Developers, system architects |
|
|
1130
|
-
| Content | Business rules, data transformations, decisions | Method names, class names, API endpoints |
|
|
1131
|
-
| Example | "Validate inventory โ Check permissions โ Create order" | "OrderController.create() โ OrderService.save()" |
|
|
1132
|
-
|
|
1133
|
-
**Key Principles:**
|
|
1134
|
-
|
|
1135
|
-
1. **One Diagram Per API Request**: Each API call triggered by the frontend should have its own business flow diagram
|
|
1136
|
-
2. **Business Perspective**: Focus on business operations, not technical implementation details
|
|
1137
|
-
3. **Source Traceability**: Add source file references for each business step
|
|
1138
|
-
|
|
1139
|
-
**Diagram Types by Scenario:**
|
|
1140
|
-
|
|
1141
|
-
| Scenario | Diagram Focus | Example Flow |
|
|
1142
|
-
|----------|---------------|--------------|
|
|
1143
|
-
| Page Initialization | Data loading sequence | Page Load โ Parameter Fetch โ Permission Check โ Data Query โ Render |
|
|
1144
|
-
| User Action | Operation handling | Click Trigger โ Data Validation โ Business Check โ Data Processing โ Result Feedback |
|
|
1145
|
-
| API Endpoint | Backend processing | Permission Check โ Data Validation โ Business Processing โ Data Persistence |
|
|
1146
|
-
|
|
1147
|
-
**For detailed diagram examples and templates, refer to:**
|
|
1148
|
-
- `templates/FEATURE-DETAIL-TEMPLATE.md` - Section 3 (Interaction Flow Description)
|
|
1149
|
-
|
|
1150
|
-
**Common Business Flow Patterns:**
|
|
1151
591
|
|
|
1152
|
-
|
|
1153
|
-
- Create: Data Validation โ Permission Check โ Duplicate Check โ Data Creation โ Related Update โ Log Recording
|
|
1154
|
-
- Read: Parameter Parsing โ Permission Check โ Data Query โ Data Assembly โ Return Result
|
|
1155
|
-
- Update: Data Validation โ Permission Check โ Existence Check โ Data Update โ Related Update โ Log Recording
|
|
1156
|
-
- Delete: Permission Check โ Existence Check โ Dependency Check โ Data Deletion โ Log Recording
|
|
592
|
+
### Business Flow Guidelines
|
|
1157
593
|
|
|
1158
|
-
|
|
1159
|
-
|
|
594
|
+
- One diagram per API request
|
|
595
|
+
- Focus on business operations
|
|
596
|
+
- Refer to `templates/FEATURE-DETAIL-TEMPLATE.md`
|
|
1160
597
|
|