speccrew 0.6.69 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.speccrew/agents/speccrew-task-worker.md +1 -1
- package/.speccrew/agents/speccrew-team-leader.md +336 -189
- package/.speccrew/skills/speccrew-agentflow-manager/SKILL.md +161 -0
- package/.speccrew/skills/speccrew-agentflow-manager/workflow.agentflow.xml +347 -0
- package/.speccrew/skills/speccrew-deploy-build/SKILL.md +3 -56
- package/.speccrew/skills/speccrew-deploy-build/workflow.agentflow.xml +125 -0
- package/.speccrew/skills/speccrew-deploy-migrate/SKILL.md +3 -64
- package/.speccrew/skills/speccrew-deploy-migrate/workflow.agentflow.xml +135 -0
- package/.speccrew/skills/speccrew-deploy-smoke-test/SKILL.md +4 -156
- package/.speccrew/skills/speccrew-deploy-smoke-test/workflow.agentflow.xml +178 -0
- package/.speccrew/skills/speccrew-deploy-startup/SKILL.md +3 -135
- package/.speccrew/skills/speccrew-deploy-startup/workflow.agentflow.xml +223 -0
- package/.speccrew/skills/speccrew-dev-backend/SKILL.md +10 -2
- package/.speccrew/skills/speccrew-dev-backend/workflow.agentflow.xml +254 -0
- package/.speccrew/skills/speccrew-dev-desktop-electron/SKILL.md +10 -2
- package/.speccrew/skills/speccrew-dev-desktop-electron/workflow.agentflow.xml +259 -0
- package/.speccrew/skills/speccrew-dev-desktop-tauri/SKILL.md +10 -2
- package/.speccrew/skills/speccrew-dev-desktop-tauri/workflow.agentflow.xml +245 -0
- package/.speccrew/skills/speccrew-dev-frontend/SKILL.md +10 -2
- package/.speccrew/skills/speccrew-dev-frontend/workflow.agentflow.xml +262 -0
- package/.speccrew/skills/speccrew-dev-mobile/SKILL.md +10 -2
- package/.speccrew/skills/speccrew-dev-mobile/workflow.agentflow.xml +244 -0
- package/.speccrew/skills/speccrew-dev-review-backend/SKILL.md +10 -2
- package/.speccrew/skills/speccrew-dev-review-backend/workflow.agentflow.xml +251 -0
- package/.speccrew/skills/speccrew-dev-review-desktop/SKILL.md +10 -2
- package/.speccrew/skills/speccrew-dev-review-desktop/workflow.agentflow.xml +214 -0
- package/.speccrew/skills/speccrew-dev-review-frontend/SKILL.md +10 -2
- package/.speccrew/skills/speccrew-dev-review-frontend/workflow.agentflow.xml +213 -0
- package/.speccrew/skills/speccrew-dev-review-mobile/SKILL.md +10 -2
- package/.speccrew/skills/speccrew-dev-review-mobile/workflow.agentflow.xml +214 -0
- package/.speccrew/skills/speccrew-fd-api-contract/SKILL.md +7 -1
- package/.speccrew/skills/speccrew-fd-api-contract/workflow.agentflow.xml +222 -0
- package/.speccrew/skills/speccrew-fd-feature-analyze/SKILL.md +7 -1
- package/.speccrew/skills/speccrew-fd-feature-analyze/workflow.agentflow.xml +223 -0
- package/.speccrew/skills/speccrew-fd-feature-design/SKILL.md +7 -1
- package/.speccrew/skills/speccrew-fd-feature-design/workflow.agentflow.xml +322 -0
- package/.speccrew/skills/speccrew-get-timestamp/SKILL.md +3 -39
- package/.speccrew/skills/speccrew-get-timestamp/workflow.agentflow.xml +43 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/SKILL.md +57 -508
- package/.speccrew/skills/{speccrew-knowledge-bizs-api-analyze-xml/SKILL.md → speccrew-knowledge-bizs-api-analyze/workflow.agentflow.xml} +1 -154
- package/.speccrew/skills/speccrew-knowledge-bizs-api-graph/SKILL.md +73 -283
- package/.speccrew/skills/{speccrew-knowledge-bizs-api-graph-xml/SKILL.md → speccrew-knowledge-bizs-api-graph/workflow.agentflow.xml} +0 -298
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/SKILL.md +931 -801
- package/.speccrew/skills/{speccrew-knowledge-bizs-dispatch-xml/SKILL.md → speccrew-knowledge-bizs-dispatch/workflow.agentflow.xml} +42 -272
- package/.speccrew/skills/speccrew-knowledge-bizs-identify-entries/SKILL.md +263 -71
- package/.speccrew/skills/{speccrew-knowledge-bizs-identify-entries-xml/SKILL.md → speccrew-knowledge-bizs-identify-entries/workflow.agentflow.xml} +8 -184
- package/.speccrew/skills/speccrew-knowledge-bizs-init-features/SKILL.md +200 -181
- package/.speccrew/skills/{speccrew-knowledge-bizs-init-features-xml/SKILL.md → speccrew-knowledge-bizs-init-features/workflow.agentflow.xml} +7 -134
- package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/SKILL.md +5 -89
- package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/workflow.agentflow.xml +129 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/SKILL.md +454 -326
- package/.speccrew/skills/{speccrew-knowledge-bizs-ui-analyze-xml/SKILL.md → speccrew-knowledge-bizs-ui-analyze/workflow.agentflow.xml} +8 -128
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-graph/SKILL.md +302 -247
- package/.speccrew/skills/{speccrew-knowledge-bizs-ui-graph-xml/SKILL.md → speccrew-knowledge-bizs-ui-graph/workflow.agentflow.xml} +7 -199
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-style-extract/SKILL.md +267 -156
- package/.speccrew/skills/{speccrew-knowledge-bizs-ui-style-extract-xml/SKILL.md → speccrew-knowledge-bizs-ui-style-extract/workflow.agentflow.xml} +7 -151
- package/.speccrew/skills/speccrew-knowledge-graph-query/SKILL.md +3 -122
- package/.speccrew/skills/speccrew-knowledge-graph-query/workflow.agentflow.xml +106 -0
- package/.speccrew/skills/speccrew-knowledge-graph-write/SKILL.md +3 -80
- package/.speccrew/skills/speccrew-knowledge-graph-write/workflow.agentflow.xml +152 -0
- package/.speccrew/skills/speccrew-knowledge-module-summarize/SKILL.md +371 -265
- package/.speccrew/skills/{speccrew-knowledge-module-summarize-xml/SKILL.md → speccrew-knowledge-module-summarize/workflow.agentflow.xml} +7 -197
- package/.speccrew/skills/speccrew-knowledge-system-summarize/SKILL.md +45 -333
- package/.speccrew/skills/{speccrew-knowledge-system-summarize-xml/SKILL.md → speccrew-knowledge-system-summarize/workflow.agentflow.xml} +0 -177
- package/.speccrew/skills/speccrew-knowledge-techs-dispatch/SKILL.md +174 -727
- package/.speccrew/skills/{speccrew-knowledge-techs-dispatch-xml/SKILL.md → speccrew-knowledge-techs-dispatch/workflow.agentflow.xml} +10 -351
- package/.speccrew/skills/speccrew-knowledge-techs-generate/SKILL.md +20 -150
- package/.speccrew/skills/{speccrew-knowledge-techs-generate-xml/SKILL.md → speccrew-knowledge-techs-generate/workflow.agentflow.xml} +0 -169
- package/.speccrew/skills/speccrew-knowledge-techs-generate-conventions/SKILL.md +75 -587
- package/.speccrew/skills/{speccrew-knowledge-techs-generate-conventions-xml/SKILL.md → speccrew-knowledge-techs-generate-conventions/workflow.agentflow.xml} +0 -153
- package/.speccrew/skills/speccrew-knowledge-techs-generate-quality/SKILL.md +463 -297
- package/.speccrew/skills/{speccrew-knowledge-techs-generate-quality-xml/SKILL.md → speccrew-knowledge-techs-generate-quality/workflow.agentflow.xml} +0 -164
- package/.speccrew/skills/speccrew-knowledge-techs-generate-ui-style/SKILL.md +57 -292
- package/.speccrew/skills/{speccrew-knowledge-techs-generate-ui-style-xml/SKILL.md → speccrew-knowledge-techs-generate-ui-style/workflow.agentflow.xml} +2 -193
- package/.speccrew/skills/speccrew-knowledge-techs-index/SKILL.md +49 -335
- package/.speccrew/skills/{speccrew-knowledge-techs-index-xml/SKILL.md → speccrew-knowledge-techs-index/workflow.agentflow.xml} +0 -167
- package/.speccrew/skills/speccrew-knowledge-techs-init/SKILL.md +28 -109
- package/.speccrew/skills/{speccrew-knowledge-techs-init-xml/SKILL.md → speccrew-knowledge-techs-init/workflow.agentflow.xml} +0 -189
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/SKILL.md +3 -487
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/workflow.agentflow.xml +278 -0
- package/.speccrew/skills/speccrew-pm-knowledge-detector/SKILL.md +3 -71
- package/.speccrew/skills/speccrew-pm-knowledge-detector/workflow.agentflow.xml +108 -0
- package/.speccrew/skills/speccrew-pm-module-initializer/SKILL.md +3 -107
- package/.speccrew/skills/speccrew-pm-module-initializer/workflow.agentflow.xml +139 -0
- package/.speccrew/skills/speccrew-pm-module-matcher/SKILL.md +3 -115
- package/.speccrew/skills/speccrew-pm-module-matcher/workflow.agentflow.xml +146 -0
- package/.speccrew/skills/speccrew-pm-requirement-analysis/SKILL.md +3 -343
- package/.speccrew/skills/speccrew-pm-requirement-analysis/workflow.agentflow.xml +174 -0
- package/.speccrew/skills/speccrew-pm-requirement-assess/SKILL.md +3 -91
- package/.speccrew/skills/speccrew-pm-requirement-assess/workflow.agentflow.xml +173 -0
- package/.speccrew/skills/speccrew-pm-requirement-clarify/SKILL.md +3 -224
- package/.speccrew/skills/speccrew-pm-requirement-clarify/workflow.agentflow.xml +159 -0
- package/.speccrew/skills/speccrew-pm-requirement-model/SKILL.md +3 -275
- package/.speccrew/skills/speccrew-pm-requirement-model/workflow.agentflow.xml +210 -0
- package/.speccrew/skills/speccrew-pm-requirement-simple/SKILL.md +3 -76
- package/.speccrew/skills/speccrew-pm-requirement-simple/workflow.agentflow.xml +120 -0
- package/.speccrew/skills/speccrew-pm-sub-prd-generate/SKILL.md +7 -1
- package/.speccrew/skills/speccrew-pm-sub-prd-generate/workflow.agentflow.xml +218 -0
- package/.speccrew/skills/speccrew-sd-backend/SKILL.md +7 -1
- package/.speccrew/skills/speccrew-sd-backend/workflow.agentflow.xml +264 -0
- package/.speccrew/skills/speccrew-sd-desktop/SKILL.md +7 -1
- package/.speccrew/skills/speccrew-sd-desktop/workflow.agentflow.xml +288 -0
- package/.speccrew/skills/speccrew-sd-framework-evaluate/SKILL.md +7 -1
- package/.speccrew/skills/speccrew-sd-framework-evaluate/workflow.agentflow.xml +235 -0
- package/.speccrew/skills/speccrew-sd-frontend/SKILL.md +7 -1
- package/.speccrew/skills/speccrew-sd-frontend/workflow.agentflow.xml +299 -0
- package/.speccrew/skills/speccrew-sd-mobile/SKILL.md +7 -1
- package/.speccrew/skills/speccrew-sd-mobile/workflow.agentflow.xml +301 -0
- package/.speccrew/skills/speccrew-test-case-design/SKILL.md +165 -284
- package/.speccrew/skills/speccrew-test-case-design/workflow.agentflow.xml +210 -0
- package/.speccrew/skills/speccrew-test-code-gen/SKILL.md +204 -324
- package/.speccrew/skills/speccrew-test-code-gen/workflow.agentflow.xml +265 -0
- package/.speccrew/skills/speccrew-test-reporter/SKILL.md +205 -184
- package/.speccrew/skills/speccrew-test-reporter/workflow.agentflow.xml +284 -0
- package/.speccrew/skills/speccrew-test-runner/SKILL.md +242 -241
- package/.speccrew/skills/speccrew-test-runner/workflow.agentflow.xml +314 -0
- package/bin/cli.js +8 -1
- package/lib/commands/init.js +11 -3
- package/lib/commands/update.js +11 -3
- package/lib/commands/validate.js +565 -0
- package/lib/utils.js +43 -0
- package/package.json +1 -1
- package/workspace-template/docs/rules/{xml-workflow-spec.md → agentflow-spec.md} +5 -5
- package/workspace-template/scripts/validate-agentflow.js +637 -0
- package/.speccrew/agents/speccrew-team-leader-xml.md +0 -480
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/STATUS-FORMATS.md +0 -99
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/batch-orchestrator.js +0 -176
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/get-next-batch.js +0 -150
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/get-pending-features.js +0 -106
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/mark-stale.js +0 -249
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/merge-features.js +0 -300
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/process-batch-results.js +0 -915
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/update-feature-status.js +0 -226
- package/.speccrew/skills/speccrew-knowledge-bizs-init-features/examples/features.json +0 -34
- package/.speccrew/skills/speccrew-knowledge-bizs-init-features/scripts/generate-inventory.js +0 -1087
- package/.speccrew/skills/speccrew-knowledge-bizs-init-features/scripts/test-inventory.js +0 -26
- package/.speccrew/skills/speccrew-knowledge-techs-dispatch/STATUS-FORMATS.md +0 -550
|
@@ -1,79 +1,3 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: speccrew-knowledge-bizs-api-graph-xml
|
|
3
|
-
description: Constructs knowledge graph data (nodes, edges, relationships) from API analysis results using XML workflow blocks. Generates graph JSON files and completion markers for the bizs knowledge pipeline.
|
|
4
|
-
tools: Read, Write, Glob, Grep, Bash
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# API Knowledge Graph Constructor (XML Workflow)
|
|
8
|
-
|
|
9
|
-
> **CRITICAL CONSTRAINT**: DO NOT create temporary scripts, batch files, or workaround code files (`.py`, `.bat`, `.sh`, `.ps1`, etc.) under any circumstances. If execution encounters errors, STOP and report the exact error. Fixes must be applied to the Skill definition or source scripts — not patched at runtime.
|
|
10
|
-
|
|
11
|
-
Construct knowledge graph data structures (nodes and edges) from API analysis results. This skill transforms structured API documentation into graph JSON format for knowledge base integration.
|
|
12
|
-
|
|
13
|
-
## Language Adaptation
|
|
14
|
-
|
|
15
|
-
This skill automatically adapts to the user's input language. All documentation and output will be generated in the same language as the user's query.
|
|
16
|
-
|
|
17
|
-
## Trigger Scenarios
|
|
18
|
-
|
|
19
|
-
- "Construct graph data from API analysis results"
|
|
20
|
-
- "Generate knowledge graph nodes and edges for API feature"
|
|
21
|
-
- "Write graph JSON for API controller"
|
|
22
|
-
|
|
23
|
-
## Input Parameters
|
|
24
|
-
|
|
25
|
-
| Parameter | Required | Description | Example |
|
|
26
|
-
|-----------|----------|-------------|---------|
|
|
27
|
-
| `api_analysis_path` | Yes | Path to the API analysis document (from bizs-api-analyze) | `"speccrew-workspace/knowledges/bizs/admin-api/system/user/UserController.md"` |
|
|
28
|
-
| `platform_id` | Yes | Target platform identifier | `"admin-api"`, `"app-api"` |
|
|
29
|
-
| `output_dir` | Yes | Output directory for graph data | `"speccrew-workspace/knowledges/base/sync-state/knowledge-bizs/completed"` |
|
|
30
|
-
| `module` | Yes | Business module name | `"system"`, `"trade"`, `"ai"` |
|
|
31
|
-
| `fileName` | Yes | Controller class name (without extension) | `"UserController"` |
|
|
32
|
-
| `sourcePath` | Yes | Relative path to source file | `"yudao-module-system/.../UserController.java"` |
|
|
33
|
-
| `sourceFile` | Yes | Source features JSON filename | `"features-admin-api.json"` |
|
|
34
|
-
| `language` | Yes | Target language for content | `"zh"`, `"en"` |
|
|
35
|
-
| `subpath` | No | Subpath extracted from sourcePath (for marker naming) | `"controller-admin-user"` |
|
|
36
|
-
|
|
37
|
-
## Output Variables
|
|
38
|
-
|
|
39
|
-
| Variable | Type | Description |
|
|
40
|
-
|----------|------|-------------|
|
|
41
|
-
| `{{status}}` | string | Graph construction status: `"success"` or `"failed"` |
|
|
42
|
-
| `{{graph_file}}` | string | Path to the generated graph JSON file |
|
|
43
|
-
| `{{node_count}}` | integer | Number of nodes generated |
|
|
44
|
-
| `{{edge_count}}` | integer | Number of edges generated |
|
|
45
|
-
|
|
46
|
-
## Execution Requirements
|
|
47
|
-
|
|
48
|
-
This skill operates in **strict sequential execution mode**:
|
|
49
|
-
- Execute steps in exact order (Step 1 → Step 2 → ... → Step 6)
|
|
50
|
-
- Output step status after each step completion
|
|
51
|
-
- Do NOT skip any step
|
|
52
|
-
|
|
53
|
-
## Output
|
|
54
|
-
|
|
55
|
-
**Generated Files:**
|
|
56
|
-
1. `{{output_dir}}/{module}-{subpath}-{fileName}.graph.json` - Graph data with nodes and edges
|
|
57
|
-
2. `{{output_dir}}/{module}-{subpath}-{fileName}.graph-done.json` - Graph completion marker
|
|
58
|
-
|
|
59
|
-
**Return Value:**
|
|
60
|
-
```json
|
|
61
|
-
{
|
|
62
|
-
"status": "success|failed",
|
|
63
|
-
"module": "{{module}}",
|
|
64
|
-
"fileName": "{{fileName}}",
|
|
65
|
-
"graphFile": "{{output_dir}}/{module}-{subpath}-{fileName}.graph.json",
|
|
66
|
-
"nodeCount": 15,
|
|
67
|
-
"edgeCount": 23,
|
|
68
|
-
"message": "Generated graph data with 15 nodes and 23 edges"
|
|
69
|
-
}
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
## Workflow
|
|
73
|
-
|
|
74
|
-
> **REQUIRED**: Before executing this workflow, read the XML workflow specification: `speccrew-workspace/docs/rules/xml-workflow-spec.md`
|
|
75
|
-
|
|
76
|
-
```xml
|
|
77
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
78
2
|
<workflow id="api-knowledge-graph-construction" version="1.0" status="pending" desc="API knowledge graph construction workflow">
|
|
79
3
|
|
|
@@ -385,225 +309,3 @@ This skill operates in **strict sequential execution mode**:
|
|
|
385
309
|
</block>
|
|
386
310
|
|
|
387
311
|
</workflow>
|
|
388
|
-
```
|
|
389
|
-
|
|
390
|
-
## Node ID Naming Convention
|
|
391
|
-
|
|
392
|
-
```
|
|
393
|
-
{type}-{module}-{name}
|
|
394
|
-
|
|
395
|
-
Examples:
|
|
396
|
-
api-system-user-list
|
|
397
|
-
api-system-user-create
|
|
398
|
-
service-system-user-service
|
|
399
|
-
table-system-system_user
|
|
400
|
-
dto-system-user-create-req
|
|
401
|
-
```
|
|
402
|
-
|
|
403
|
-
## Marker File Naming Convention
|
|
404
|
-
|
|
405
|
-
```
|
|
406
|
-
{output_dir}/{module}-{subpath}-{fileName}.graph.json
|
|
407
|
-
```
|
|
408
|
-
|
|
409
|
-
**How to Extract Each Component:**
|
|
410
|
-
|
|
411
|
-
1. **module**: Use `{{module}}` input variable directly (e.g., `system`, `trade`, `ai`)
|
|
412
|
-
|
|
413
|
-
2. **subpath**: Extract from `{{sourcePath}}`:
|
|
414
|
-
- For Java: Remove package prefix up to the business layer (e.g., `controller/admin/`, `controller/app/`)
|
|
415
|
-
- Remove the file name at the end
|
|
416
|
-
- Replace path separators (`/`) with hyphens (`-`)
|
|
417
|
-
- If the file is at module root, subpath will be empty → omit from filename
|
|
418
|
-
|
|
419
|
-
3. **fileName**: Use `{{fileName}}` input variable (class name WITHOUT extension)
|
|
420
|
-
|
|
421
|
-
**Examples:**
|
|
422
|
-
|
|
423
|
-
| sourcePath | module | subpath | fileName | Marker Filename |
|
|
424
|
-
|------------|--------|---------|----------|-----------------|
|
|
425
|
-
| `yudao-module-system/.../controller/admin/notify/NotifyMessageController.java` | `system` | `controller-admin-notify` | `NotifyMessageController` | `system-controller-admin-notify-NotifyMessageController.graph.json` |
|
|
426
|
-
| `yudao-module-system/.../controller/admin/user/UserController.java` | `system` | `controller-admin-user` | `UserController` | `system-controller-admin-user-UserController.graph.json` |
|
|
427
|
-
| `yudao-module-ai/.../controller/admin/chat/ChatConversationController.java` | `ai` | `controller-admin-chat` | `ChatConversationController` | `ai-controller-admin-chat-ChatConversationController.graph.json` |
|
|
428
|
-
|
|
429
|
-
## Node Type Reference
|
|
430
|
-
|
|
431
|
-
| Type | Description | Required Metadata |
|
|
432
|
-
|------|-------------|-------------------|
|
|
433
|
-
| `api` | API endpoint | `method`, `path`, `permissions` |
|
|
434
|
-
| `service` | Service class | `methods` |
|
|
435
|
-
| `table` | Database table | `fields`, `indexes` |
|
|
436
|
-
| `dto` | Data Transfer Object | `fields`, `validation` |
|
|
437
|
-
|
|
438
|
-
## Edge Type Reference
|
|
439
|
-
|
|
440
|
-
| Type | Description | Source → Target |
|
|
441
|
-
|------|-------------|-----------------|
|
|
442
|
-
| `operates` | API operates on table | api → table |
|
|
443
|
-
| `invokes` | API calls service | api → service |
|
|
444
|
-
| `references` | API uses DTO | api → dto |
|
|
445
|
-
| `depends-on` | Service dependency | service → service |
|
|
446
|
-
| `maps-to` | DTO maps to table | dto → table |
|
|
447
|
-
|
|
448
|
-
## Node Structure Examples
|
|
449
|
-
|
|
450
|
-
### API Node Example
|
|
451
|
-
```json
|
|
452
|
-
{
|
|
453
|
-
"id": "api-{module}-{endpoint-name}",
|
|
454
|
-
"type": "api",
|
|
455
|
-
"name": "<display name>",
|
|
456
|
-
"module": "{{module}}",
|
|
457
|
-
"sourcePath": "{{sourcePath}}",
|
|
458
|
-
"documentPath": "{{api_analysis_path}}",
|
|
459
|
-
"description": "...",
|
|
460
|
-
"metadata": {
|
|
461
|
-
"method": "GET",
|
|
462
|
-
"path": "/admin-api/system/user/page",
|
|
463
|
-
"permissions": ["system:user:query"]
|
|
464
|
-
}
|
|
465
|
-
}
|
|
466
|
-
```
|
|
467
|
-
|
|
468
|
-
### Service Node Example
|
|
469
|
-
```json
|
|
470
|
-
{
|
|
471
|
-
"id": "service-{module}-{service-name}",
|
|
472
|
-
"type": "service",
|
|
473
|
-
"name": "UserService",
|
|
474
|
-
"module": "{{module}}",
|
|
475
|
-
"sourcePath": "relative/path/to/UserService.java",
|
|
476
|
-
"description": "User business logic service",
|
|
477
|
-
"metadata": {
|
|
478
|
-
"methods": ["getUserPage", "createUser", "updateUser"]
|
|
479
|
-
}
|
|
480
|
-
}
|
|
481
|
-
```
|
|
482
|
-
|
|
483
|
-
### Table Node Example
|
|
484
|
-
```json
|
|
485
|
-
{
|
|
486
|
-
"id": "table-{module}-{table-name}",
|
|
487
|
-
"type": "table",
|
|
488
|
-
"name": "system_user",
|
|
489
|
-
"module": "{{module}}",
|
|
490
|
-
"sourcePath": "",
|
|
491
|
-
"description": "User table",
|
|
492
|
-
"metadata": {
|
|
493
|
-
"fields": ["id", "username", "password", "status"],
|
|
494
|
-
"indexes": ["idx_username"]
|
|
495
|
-
}
|
|
496
|
-
}
|
|
497
|
-
```
|
|
498
|
-
|
|
499
|
-
### DTO Node Example
|
|
500
|
-
```json
|
|
501
|
-
{
|
|
502
|
-
"id": "dto-{module}-{dto-name}",
|
|
503
|
-
"type": "dto",
|
|
504
|
-
"name": "UserCreateReqVO",
|
|
505
|
-
"module": "{{module}}",
|
|
506
|
-
"sourcePath": "relative/path/to/UserCreateReqVO.java",
|
|
507
|
-
"description": "Create user request DTO",
|
|
508
|
-
"metadata": {
|
|
509
|
-
"fields": ["username", "password", "nickname"],
|
|
510
|
-
"validation": ["@NotBlank username", "@Size(max=50) nickname"]
|
|
511
|
-
}
|
|
512
|
-
}
|
|
513
|
-
```
|
|
514
|
-
|
|
515
|
-
## Edge Structure Examples
|
|
516
|
-
|
|
517
|
-
### API to Table Edge (operates)
|
|
518
|
-
```json
|
|
519
|
-
{
|
|
520
|
-
"source": "api-system-user-list",
|
|
521
|
-
"target": "table-system-system_user",
|
|
522
|
-
"type": "operates",
|
|
523
|
-
"metadata": {
|
|
524
|
-
"operation": "SELECT",
|
|
525
|
-
"description": "Query user list with pagination"
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
|
-
```
|
|
529
|
-
|
|
530
|
-
### API to Service Edge (invokes)
|
|
531
|
-
```json
|
|
532
|
-
{
|
|
533
|
-
"source": "api-system-user-create",
|
|
534
|
-
"target": "service-system-user-service",
|
|
535
|
-
"type": "invokes",
|
|
536
|
-
"metadata": {
|
|
537
|
-
"method": "createUser",
|
|
538
|
-
"description": "Create user business logic"
|
|
539
|
-
}
|
|
540
|
-
}
|
|
541
|
-
```
|
|
542
|
-
|
|
543
|
-
### API to DTO Edge (references)
|
|
544
|
-
```json
|
|
545
|
-
{
|
|
546
|
-
"source": "api-system-user-create",
|
|
547
|
-
"target": "dto-system-user-create-req",
|
|
548
|
-
"type": "references",
|
|
549
|
-
"metadata": {
|
|
550
|
-
"usage": "request",
|
|
551
|
-
"description": "Create user request body"
|
|
552
|
-
}
|
|
553
|
-
}
|
|
554
|
-
```
|
|
555
|
-
|
|
556
|
-
### Service to Service Edge (depends-on)
|
|
557
|
-
```json
|
|
558
|
-
{
|
|
559
|
-
"source": "service-system-user-service",
|
|
560
|
-
"target": "service-system-permission-service",
|
|
561
|
-
"type": "depends-on",
|
|
562
|
-
"metadata": {
|
|
563
|
-
"description": "User service depends on permission service for role checks"
|
|
564
|
-
}
|
|
565
|
-
}
|
|
566
|
-
```
|
|
567
|
-
|
|
568
|
-
### DTO to Table Edge (maps-to)
|
|
569
|
-
```json
|
|
570
|
-
{
|
|
571
|
-
"source": "dto-system-user-do",
|
|
572
|
-
"target": "table-system-system_user",
|
|
573
|
-
"type": "maps-to",
|
|
574
|
-
"metadata": {
|
|
575
|
-
"description": "UserDO maps to system_user table"
|
|
576
|
-
}
|
|
577
|
-
}
|
|
578
|
-
```
|
|
579
|
-
|
|
580
|
-
## Pre-write Verification Checklist
|
|
581
|
-
|
|
582
|
-
### Graph JSON Verification:
|
|
583
|
-
- [ ] Root-level `module` field is present (MANDATORY)
|
|
584
|
-
- [ ] `nodes` and `edges` are arrays (can be empty)
|
|
585
|
-
- [ ] Valid JSON (no trailing commas, all strings quoted)
|
|
586
|
-
- [ ] All node IDs are unique
|
|
587
|
-
- [ ] All edge source/target references point to valid node IDs
|
|
588
|
-
|
|
589
|
-
### API Endpoint Coverage Check:
|
|
590
|
-
- [ ] ALL public API endpoint methods in the controller are represented as `api` nodes
|
|
591
|
-
- [ ] Status update endpoints (updateStatus, toggleEnable) are included
|
|
592
|
-
- [ ] Special operation endpoints (resetPassword, export, import, batch operations) are included
|
|
593
|
-
- [ ] Each `api` node has proper metadata with HTTP method and path
|
|
594
|
-
- [ ] No public endpoint method is left without a corresponding node
|
|
595
|
-
|
|
596
|
-
### Completion Marker Verification:
|
|
597
|
-
- [ ] Filename follows `{module}-{subpath}-{fileName}.graph-done.json` pattern
|
|
598
|
-
- [ ] JSON is valid
|
|
599
|
-
- [ ] All required fields are present
|
|
600
|
-
- [ ] `nodeCount` and `edgeCount` match actual graph data
|
|
601
|
-
|
|
602
|
-
## Constraints
|
|
603
|
-
|
|
604
|
-
1. **Single Document Input**: This skill processes ONE API analysis document at a time
|
|
605
|
-
2. **JSON Format**: All output files MUST be valid JSON
|
|
606
|
-
3. **Module Field**: The root-level `module` field is MANDATORY in graph JSON
|
|
607
|
-
4. **Node Uniqueness**: Each node ID must be unique within the graph
|
|
608
|
-
5. **Edge Validity**: Edge source/target must reference existing node IDs
|
|
609
|
-
6. **Path Format**: Use relative paths, NEVER absolute paths in JSON content
|