flowmind 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +855 -0
- package/README_CN.md +854 -0
- package/bin/flowmind.js +464 -0
- package/core/adapters/api-doc-adapter.js +71 -0
- package/core/adapters/base-adapter.js +80 -0
- package/core/adapters/database-manager-adapter.js +60 -0
- package/core/adapters/database-query-adapter.js +51 -0
- package/core/adapters/knowledge-base-adapter.js +75 -0
- package/core/adapters/log-service-adapter.js +41 -0
- package/core/adapters/mcp-adapter.js +65 -0
- package/core/adapters/report-adapter.js +60 -0
- package/core/adapters/workflow-adapter.js +62 -0
- package/core/component-registry.js +281 -0
- package/core/component-types.js +63 -0
- package/core/config-manager.js +360 -0
- package/core/index.js +223 -0
- package/core/learning-engine.js +588 -0
- package/core/mcp-compatibility.js +150 -0
- package/core/providers/aliyun/dms-adapter.js +98 -0
- package/core/providers/aliyun/redis-adapter.js +88 -0
- package/core/providers/aliyun/sls-adapter.js +86 -0
- package/core/providers/friday/flow-adapter.js +85 -0
- package/core/providers/friday/report-adapter.js +83 -0
- package/core/providers/yapi/yapi-adapter.js +79 -0
- package/core/providers/yuque/yuque-adapter.js +90 -0
- package/core/scene-matcher.js +326 -0
- package/core/skill-loader.js +291 -0
- package/package.json +67 -0
- package/scripts/migrate-config.js +153 -0
- package/skills/api-sync/SKILL.md +203 -0
- package/skills/archive-change/SKILL.md +172 -0
- package/skills/auto-flow/SKILL.md +277 -0
- package/skills/code-review/SKILL.md +206 -0
- package/skills/code-review-audit/SKILL.md +150 -0
- package/skills/data-logic-validation/SKILL.md +162 -0
- package/skills/data-validation/SKILL.md +210 -0
- package/skills/git-review/SKILL.md +190 -0
- package/skills/learning-engine/SKILL.md +352 -0
- package/skills/learning-feedback/SKILL.md +174 -0
- package/skills/log-audit/SKILL.md +226 -0
- package/skills/project-review/SKILL.md +196 -0
- package/skills/requirement-analyst/SKILL.md +275 -0
- package/skills/resource-bind/SKILL.md +222 -0
- package/skills/sls-log-audit/SKILL.md +223 -0
- package/skills/yapi-sync-interface/SKILL.md +145 -0
- package/skills/yuque-sync-design/SKILL.md +157 -0
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: log-audit
|
|
3
|
+
description: Log analysis and trace visualization skill for FlowMind. Analyze application logs, trace requests, debug performance issues.
|
|
4
|
+
metadata:
|
|
5
|
+
version: "1.1.0"
|
|
6
|
+
author: flowmind
|
|
7
|
+
category: monitoring
|
|
8
|
+
componentDependencies:
|
|
9
|
+
- logService
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Log Audit Skill
|
|
13
|
+
|
|
14
|
+
Analyze application logs, trace requests, and debug performance issues with FlowMind intelligence.
|
|
15
|
+
|
|
16
|
+
## Features
|
|
17
|
+
|
|
18
|
+
### ๐ Log Query
|
|
19
|
+
- Time-based filtering
|
|
20
|
+
- Service filtering
|
|
21
|
+
- Level filtering (ERROR, WARN, INFO, DEBUG)
|
|
22
|
+
- Keyword search
|
|
23
|
+
- Trace ID lookup
|
|
24
|
+
|
|
25
|
+
### ๐ Trace Analysis
|
|
26
|
+
- Full call chain visualization
|
|
27
|
+
- Duration breakdown
|
|
28
|
+
- Error identification
|
|
29
|
+
- Bottleneck detection
|
|
30
|
+
|
|
31
|
+
### โก Performance Analysis
|
|
32
|
+
- Slow query detection
|
|
33
|
+
- Timeout identification
|
|
34
|
+
- Resource bottleneck analysis
|
|
35
|
+
|
|
36
|
+
## Trigger Patterns
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
"ๆฅๅฟ", "log", "ๆฅ็ๆฅๅฟ", "ๅๆๆฅๅฟ"
|
|
40
|
+
"traceId", "้พ่ทฏ", "trace", "่ฐ็จ้พ"
|
|
41
|
+
"้่ฏฏๆฅๅฟ", "ๅผๅธธๆฅๅฟ", "error log"
|
|
42
|
+
"ๆง่ฝๅๆ", "่ๆถๅๆ", "performance"
|
|
43
|
+
"ๆๆฅ", "่ฐ่ฏ", "debug"
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Output Formats
|
|
47
|
+
|
|
48
|
+
### Sequential List (Default for Traces)
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
TraceId: {traceId}
|
|
52
|
+
Time: {startTime} ~ {endTime}
|
|
53
|
+
Duration: {totalDuration}ms | Requests: {count}
|
|
54
|
+
|
|
55
|
+
=== Requests ===
|
|
56
|
+
|
|
57
|
+
[1] {time} | {service} | {duration}ms
|
|
58
|
+
{method} {url}
|
|
59
|
+
Request: {params}
|
|
60
|
+
Response: {body}
|
|
61
|
+
|
|
62
|
+
[2] {time} | {service} | {duration}ms
|
|
63
|
+
{method} {url}
|
|
64
|
+
Request: {params}
|
|
65
|
+
Response: {body}
|
|
66
|
+
|
|
67
|
+
=== Summary ===
|
|
68
|
+
Bottleneck: {service} - {url} ({duration}ms)
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Log Summary
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
75
|
+
โ Log Analysis โ
|
|
76
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
|
|
77
|
+
โ Time: {range} โ
|
|
78
|
+
โ Total: {count} | Errors: {errorCount} โ
|
|
79
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
|
|
80
|
+
โ Key Errors: โ
|
|
81
|
+
โ โข [{time}] {error} โ
|
|
82
|
+
โ โข [{time}] {error} โ
|
|
83
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Component Integration
|
|
87
|
+
|
|
88
|
+
This skill uses the **logService** component. The actual log service provider is determined by configuration.
|
|
89
|
+
|
|
90
|
+
| Provider | MCP Server | Description |
|
|
91
|
+
|----------|------------|-------------|
|
|
92
|
+
| aliyun-sls | friday-sls-logs | Alibaba Cloud SLS |
|
|
93
|
+
| baidu-sls | baidu-sls-logs | Baidu Cloud Log Service |
|
|
94
|
+
| elk | (direct) | Elasticsearch |
|
|
95
|
+
|
|
96
|
+
Configuration is managed in `flowmind.config.json` under `components.logService`.
|
|
97
|
+
|
|
98
|
+
## Learning Integration
|
|
99
|
+
|
|
100
|
+
This skill supports FlowMind learning:
|
|
101
|
+
|
|
102
|
+
- **Output Format**: Learns preferred format
|
|
103
|
+
- **Query Patterns**: Learns common queries
|
|
104
|
+
- **Filter Preferences**: Learns which filters to apply
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
User: "็จ้กบๅบๅ่กจๆ ผๅผ"
|
|
108
|
+
FlowMind: โ Learned for log-audit
|
|
109
|
+
|
|
110
|
+
User: [Next query]
|
|
111
|
+
FlowMind: [Applies sequential list automatically]
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Configuration
|
|
115
|
+
|
|
116
|
+
Skill-specific configuration:
|
|
117
|
+
|
|
118
|
+
```json
|
|
119
|
+
{
|
|
120
|
+
"log-audit": {
|
|
121
|
+
"defaultFormat": "sequential-list",
|
|
122
|
+
"excludeInfrastructure": true
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Log service provider is configured via `components.logService` in `flowmind.config.json`.
|
|
128
|
+
|
|
129
|
+
## Examples
|
|
130
|
+
|
|
131
|
+
### Example 1: Trace Query
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
User: ๆฅ่ฏข traceId abc123 ็ๅฎๆด้พ่ทฏ
|
|
135
|
+
|
|
136
|
+
FlowMind:
|
|
137
|
+
TraceId: abc123
|
|
138
|
+
Time: 2026-06-22 10:00:00 ~ 10:00:05
|
|
139
|
+
Duration: 5000ms | Requests: 8
|
|
140
|
+
|
|
141
|
+
=== Requests ===
|
|
142
|
+
|
|
143
|
+
[1] 10:00:00.100 | order-service | 150ms
|
|
144
|
+
POST /api/orders
|
|
145
|
+
Request: {"userId": "123"}
|
|
146
|
+
Response: {"orderId": "ORD-001"}
|
|
147
|
+
|
|
148
|
+
[2] 10:00:00.300 | payment-service | 2000ms โ ๏ธ
|
|
149
|
+
POST /api/payments
|
|
150
|
+
Request: {"orderId": "ORD-001"}
|
|
151
|
+
Response: {"status": "success"}
|
|
152
|
+
|
|
153
|
+
=== Summary ===
|
|
154
|
+
Bottleneck: payment-service (2000ms)
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### Example 2: Error Analysis
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
User: ๆฅ็ๆ่ฟ1ๅฐๆถ็้่ฏฏๆฅๅฟ
|
|
161
|
+
|
|
162
|
+
FlowMind:
|
|
163
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
164
|
+
โ Error Analysis โ
|
|
165
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
|
|
166
|
+
โ Time: 09:00 ~ 10:00 โ
|
|
167
|
+
โ Errors: 3 โ
|
|
168
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
|
|
169
|
+
โ โข 09:15 NullPointerException โ
|
|
170
|
+
โ โข 09:32 ConnectionTimeout โ
|
|
171
|
+
โ โข 09:45 ValidationException โ
|
|
172
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
## Query Templates
|
|
176
|
+
|
|
177
|
+
### Default (Exclude Infrastructure)
|
|
178
|
+
|
|
179
|
+
```
|
|
180
|
+
service != 'gateway'
|
|
181
|
+
AND service NOT LIKE '%-gateway'
|
|
182
|
+
AND service != 'nacos'
|
|
183
|
+
AND service != 'sentinel'
|
|
184
|
+
AND tag != 'health-check'
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
### Errors Only
|
|
188
|
+
|
|
189
|
+
```
|
|
190
|
+
level = 'ERROR'
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### Slow Requests
|
|
194
|
+
|
|
195
|
+
```
|
|
196
|
+
duration > 1000
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
## Customization
|
|
200
|
+
|
|
201
|
+
### Custom Templates
|
|
202
|
+
|
|
203
|
+
```json
|
|
204
|
+
{
|
|
205
|
+
"log-audit": {
|
|
206
|
+
"templates": {
|
|
207
|
+
"my-service": "service = 'my-service'",
|
|
208
|
+
"slow-db": "duration > 500 AND type = 'db'"
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
### Custom Formats
|
|
215
|
+
|
|
216
|
+
```json
|
|
217
|
+
{
|
|
218
|
+
"log-audit": {
|
|
219
|
+
"formats": {
|
|
220
|
+
"compact": { "maxLines": 10 },
|
|
221
|
+
"detailed": { "includeHeaders": true },
|
|
222
|
+
"json": { "format": "json" }
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
```
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: project-review
|
|
3
|
+
description: Project-level review and analysis skill for FlowMind. Analyze project health, dependencies, and overall quality.
|
|
4
|
+
metadata:
|
|
5
|
+
version: "1.0.0"
|
|
6
|
+
author: flowmind
|
|
7
|
+
category: quality
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Project Review Skill
|
|
11
|
+
|
|
12
|
+
Analyze project health, dependencies, and overall quality.
|
|
13
|
+
|
|
14
|
+
## Features
|
|
15
|
+
|
|
16
|
+
### ๐ Project Health
|
|
17
|
+
- Dependency analysis
|
|
18
|
+
- Security audit
|
|
19
|
+
- License compliance
|
|
20
|
+
- Update status
|
|
21
|
+
|
|
22
|
+
### ๐ Code Metrics
|
|
23
|
+
- Code complexity
|
|
24
|
+
- Test coverage
|
|
25
|
+
- Documentation coverage
|
|
26
|
+
- Technical debt
|
|
27
|
+
|
|
28
|
+
### ๐ Security Analysis
|
|
29
|
+
- Vulnerability scanning
|
|
30
|
+
- Dependency risks
|
|
31
|
+
- Secret detection
|
|
32
|
+
- Best practices
|
|
33
|
+
|
|
34
|
+
## Trigger Patterns
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
"้กน็ฎๅฎกๆฅ", "project review"
|
|
38
|
+
"ไพ่ตๆฃๆฅ", "dependency check"
|
|
39
|
+
"ๅฎๅ
จๅฎก่ฎก", "security audit"
|
|
40
|
+
"ไปฃ็ ่ดจ้", "code quality"
|
|
41
|
+
"้กน็ฎๅฅๅบท", "project health"
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Output Format
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
48
|
+
โ Project Review Report โ
|
|
49
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
|
|
50
|
+
โ Project: {project_name} โ
|
|
51
|
+
โ Language: {language} โ
|
|
52
|
+
โ Last Updated: {date} โ
|
|
53
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
|
|
54
|
+
โ Health Score: {score}/100 โ
|
|
55
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
|
|
56
|
+
โ Dependencies: โ
|
|
57
|
+
โ โข Total: {count} โ
|
|
58
|
+
โ โข Outdated: {outdated} โ
|
|
59
|
+
โ โข Vulnerable: {vulnerable} โ
|
|
60
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
|
|
61
|
+
โ Code Quality: โ
|
|
62
|
+
โ โข Complexity: {level} โ
|
|
63
|
+
โ โข Test Coverage: {percent}% โ
|
|
64
|
+
โ โข Documentation: {percent}% โ
|
|
65
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
|
|
66
|
+
โ Recommendations: โ
|
|
67
|
+
โ โข {recommendation} โ
|
|
68
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Health Checks
|
|
72
|
+
|
|
73
|
+
### Dependencies
|
|
74
|
+
|
|
75
|
+
| Check | Description |
|
|
76
|
+
|-------|-------------|
|
|
77
|
+
| Outdated | Packages needing update |
|
|
78
|
+
| Vulnerable | Known security issues |
|
|
79
|
+
| Unused | Unused dependencies |
|
|
80
|
+
| License | License compliance |
|
|
81
|
+
|
|
82
|
+
### Code Quality
|
|
83
|
+
|
|
84
|
+
| Check | Description |
|
|
85
|
+
|-------|-------------|
|
|
86
|
+
| Complexity | Cyclomatic complexity |
|
|
87
|
+
| Duplication | Code duplication |
|
|
88
|
+
| Coverage | Test coverage |
|
|
89
|
+
| Documentation | Doc coverage |
|
|
90
|
+
|
|
91
|
+
## Learning Integration
|
|
92
|
+
|
|
93
|
+
This skill supports FlowMind learning:
|
|
94
|
+
|
|
95
|
+
- **Review Focus**: Learns what to check first
|
|
96
|
+
- **Severity Levels**: Learns your standards
|
|
97
|
+
- **Auto-fix**: Learns what to fix automatically
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
User: "ๅ
ๆฃๆฅๅฎๅ
จๆผๆด"
|
|
101
|
+
FlowMind: โ Learned: Check security first
|
|
102
|
+
|
|
103
|
+
User: [Next review]
|
|
104
|
+
FlowMind: [Prioritizes security checks]
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Examples
|
|
108
|
+
|
|
109
|
+
### Example 1: Full Project Review
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
User: ๅฎกๆฅ้กน็ฎๆดไฝ็ถๅต
|
|
113
|
+
|
|
114
|
+
FlowMind:
|
|
115
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
116
|
+
โ Project Review Report โ
|
|
117
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
|
|
118
|
+
โ Project: my-app โ
|
|
119
|
+
โ Language: JavaScript/Node.js โ
|
|
120
|
+
โ Last Updated: 2026-06-22 โ
|
|
121
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
|
|
122
|
+
โ Health Score: 82/100 โ
|
|
123
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
|
|
124
|
+
โ Dependencies: โ
|
|
125
|
+
โ โข Total: 45 โ
|
|
126
|
+
โ โข Outdated: 8 โ
|
|
127
|
+
โ โข Vulnerable: 2 โ
|
|
128
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
|
|
129
|
+
โ Code Quality: โ
|
|
130
|
+
โ โข Complexity: Medium โ
|
|
131
|
+
โ โข Test Coverage: 76% โ
|
|
132
|
+
โ โข Documentation: 65% โ
|
|
133
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
|
|
134
|
+
โ โ ๏ธ Issues Found: โ
|
|
135
|
+
โ โข 2 vulnerable dependencies โ
|
|
136
|
+
โ โข 8 outdated packages โ
|
|
137
|
+
โ โข Low documentation coverage โ
|
|
138
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
|
|
139
|
+
โ Recommendations: โ
|
|
140
|
+
โ โข Run 'npm audit fix' โ
|
|
141
|
+
โ โข Update outdated packages โ
|
|
142
|
+
โ โข Add JSDoc comments โ
|
|
143
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Example 2: Security Audit
|
|
147
|
+
|
|
148
|
+
```
|
|
149
|
+
User: ่ฟ่กๅฎๅ
จๅฎก่ฎก
|
|
150
|
+
|
|
151
|
+
FlowMind:
|
|
152
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
153
|
+
โ Security Audit Report โ
|
|
154
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
|
|
155
|
+
โ Vulnerabilities: 2 found โ
|
|
156
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
|
|
157
|
+
โ ๐ด HIGH: lodash < 4.17.21 โ
|
|
158
|
+
โ Prototype Pollution โ
|
|
159
|
+
โ Fix: npm install lodash@latest โ
|
|
160
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
|
|
161
|
+
โ ๐ก MEDIUM: axios < 0.21.1 โ
|
|
162
|
+
โ SSRF Vulnerability โ
|
|
163
|
+
โ Fix: npm install axios@latest โ
|
|
164
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
|
|
165
|
+
โ Secrets: None detected โ โ
|
|
166
|
+
โ HTTPS: All connections secure โ โ
|
|
167
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
## Configuration
|
|
171
|
+
|
|
172
|
+
```json
|
|
173
|
+
{
|
|
174
|
+
"project-review": {
|
|
175
|
+
"checks": {
|
|
176
|
+
"dependencies": true,
|
|
177
|
+
"security": true,
|
|
178
|
+
"quality": true,
|
|
179
|
+
"documentation": true
|
|
180
|
+
},
|
|
181
|
+
"thresholds": {
|
|
182
|
+
"coverage": 80,
|
|
183
|
+
"complexity": 10
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
## Review Checklist
|
|
190
|
+
|
|
191
|
+
- [ ] Dependencies up to date
|
|
192
|
+
- [ ] No known vulnerabilities
|
|
193
|
+
- [ ] Test coverage > 80%
|
|
194
|
+
- [ ] Documentation complete
|
|
195
|
+
- [ ] License compliant
|
|
196
|
+
- [ ] No secrets in code
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: requirement-analyst
|
|
3
|
+
description: Requirement analyst skill for FlowMind. Six-dimensional analysis: historical design principles, iteration rationale, extensibility, market roadmap, requirement-code deviation, and upgrade vulnerabilities.
|
|
4
|
+
metadata:
|
|
5
|
+
version: "1.0.0"
|
|
6
|
+
author: flowmind
|
|
7
|
+
category: analysis
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Requirement Analyst Skill
|
|
11
|
+
|
|
12
|
+
Comprehensive requirement analysis combining code reality with requirement intent. Acts as a senior requirement analyst (้ๆฑๅๆๅธ) evaluating from six dimensions.
|
|
13
|
+
|
|
14
|
+
## Features
|
|
15
|
+
|
|
16
|
+
### Historical Design Principle Evaluation
|
|
17
|
+
- Evaluate why historical designs were made
|
|
18
|
+
- Assess design validity in current context
|
|
19
|
+
- Identify design debt and knowledge gaps
|
|
20
|
+
|
|
21
|
+
### Iteration Rationale Assessment
|
|
22
|
+
- Analyze iteration driving forces
|
|
23
|
+
- Evaluate iteration quality and pace
|
|
24
|
+
- Identify anomalous iterations (rollback, rework, over-design)
|
|
25
|
+
|
|
26
|
+
### Extensibility Assessment
|
|
27
|
+
- Development extensibility (modularity, interfaces, configurability)
|
|
28
|
+
- Requirement upgrade extensibility (data model, API compatibility)
|
|
29
|
+
- User growth extensibility (performance, caching, horizontal scaling)
|
|
30
|
+
|
|
31
|
+
### Market Roadmap Planning
|
|
32
|
+
- Feature coverage analysis
|
|
33
|
+
- Requirement trend analysis
|
|
34
|
+
- Short/mid/long-term development roadmap
|
|
35
|
+
|
|
36
|
+
### Requirement-Code Deviation Analysis
|
|
37
|
+
- Feature gaps (required but not implemented)
|
|
38
|
+
- Over-implementation (implemented but not required)
|
|
39
|
+
- Understanding gaps (implementation doesn't match intent)
|
|
40
|
+
- Documentation lag (code changed, docs not updated)
|
|
41
|
+
|
|
42
|
+
### Upgrade Vulnerability Identification
|
|
43
|
+
- Data model fragility
|
|
44
|
+
- API incompatibility risks
|
|
45
|
+
- Hardcoded traps
|
|
46
|
+
- Test blind spots
|
|
47
|
+
- Dependency coupling
|
|
48
|
+
|
|
49
|
+
## Trigger Patterns
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
"้ๆฑๅๆ", "้ๆฑ่ฏๅฎก", "้ๆฑ่ฏไผฐ"
|
|
53
|
+
"่ฎพ่ฎก่ฏๅฎก", "่ฎพ่ฎก่ฏไผฐ", "่ฎพ่ฎกๅ็ๅๆ"
|
|
54
|
+
"่ฟญไปฃ่ฏไผฐ", "่ฟญไปฃๅๆ", "่ฟญไปฃๅ้กพ"
|
|
55
|
+
"ๆฉๅฑๆง่ฏไผฐ", "ๆฉๅฑๆงๅๆ", "ๆถๆ่ฏไผฐ"
|
|
56
|
+
"ๅธๅบ่งๅ", "ไบงๅ่งๅ", "ๅๅฑ่ทฏ็บฟ"
|
|
57
|
+
"้ๆฑๅๅทฎ", "้ๆฑๅๅทฎๅๆ", "ไปฃ็ ไธ้ๆฑๅฏนๆฏ"
|
|
58
|
+
"ๅ็บง้ฃ้ฉ", "ๅ็บงๆผๆด", "ๆๆฏๅบๅก่ฏไผฐ"
|
|
59
|
+
"ๅ
จ้ขๅๆ", "้ๆฑๅๆๅธ"
|
|
60
|
+
"requirement analysis", "design review"
|
|
61
|
+
"iteration review", "extensibility assessment"
|
|
62
|
+
"market roadmap", "requirement deviation"
|
|
63
|
+
"upgrade risk", "technical debt"
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Output Format
|
|
67
|
+
|
|
68
|
+
### Comprehensive Report
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
72
|
+
โ Requirement Analysis Report โ
|
|
73
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
|
|
74
|
+
โ Project: {project_name} โ
|
|
75
|
+
โ Analysis Scope: {dimensions} โ
|
|
76
|
+
โ Overall Score: {score}/100 โ
|
|
77
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
|
|
78
|
+
โ Dimension Scores: โ
|
|
79
|
+
โ โข Historical Design: {score}/100 โ
|
|
80
|
+
โ โข Iteration Rationale: {score}/100 โ
|
|
81
|
+
โ โข Extensibility: {score}/100 โ
|
|
82
|
+
โ โข Market Roadmap: {score}/100 โ
|
|
83
|
+
โ โข Req-Code Deviation: {score}/100 โ
|
|
84
|
+
โ โข Upgrade Vulnerability: {score}/100 โ
|
|
85
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
|
|
86
|
+
โ Key Findings: โ
|
|
87
|
+
โ โข {finding_1} โ
|
|
88
|
+
โ โข {finding_2} โ
|
|
89
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
|
|
90
|
+
โ Priority Actions: โ
|
|
91
|
+
โ P0: {action_1} โ
|
|
92
|
+
โ P1: {action_2} โ
|
|
93
|
+
โ P2: {action_3} โ
|
|
94
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Single Dimension Report
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
101
|
+
โ {Dimension} Assessment Report โ
|
|
102
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
|
|
103
|
+
โ Score: {score}/100 โ
|
|
104
|
+
โ Status: {status} โ
|
|
105
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
|
|
106
|
+
โ Findings: โ
|
|
107
|
+
โ 1. {finding} - {severity} โ
|
|
108
|
+
โ 2. {finding} - {severity} โ
|
|
109
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
|
|
110
|
+
โ Recommendations: โ
|
|
111
|
+
โ โข {recommendation} โ
|
|
112
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Analysis Dimensions Detail
|
|
116
|
+
|
|
117
|
+
### Dimension 1: Historical Design Principles
|
|
118
|
+
|
|
119
|
+
| Item | Description |
|
|
120
|
+
|------|-------------|
|
|
121
|
+
| Design Intent | What problem was the design solving? |
|
|
122
|
+
| Design Basis | What data/assumptions/constraints was it based on? |
|
|
123
|
+
| Current Validity | Is the design still valid today? |
|
|
124
|
+
| Design Debt | Which decisions have become technical debt? |
|
|
125
|
+
| Knowledge Transfer | Is design knowledge effectively preserved? |
|
|
126
|
+
|
|
127
|
+
### Dimension 2: Iteration Rationale
|
|
128
|
+
|
|
129
|
+
| Item | Description |
|
|
130
|
+
|------|-------------|
|
|
131
|
+
| Driving Force | Demand-driven, tech-driven, or market-driven? |
|
|
132
|
+
| Evolution Path | Is the iteration path logical? |
|
|
133
|
+
| Iteration Quality | Clean implementation or leftover debt? |
|
|
134
|
+
| Iteration Pace | Is the frequency reasonable? |
|
|
135
|
+
| Anomalous Iterations | Rollbacks, reworks, over-design? |
|
|
136
|
+
|
|
137
|
+
### Dimension 3: Extensibility
|
|
138
|
+
|
|
139
|
+
| Category | Assessment Items |
|
|
140
|
+
|----------|-----------------|
|
|
141
|
+
| Development | Modularity, interface abstraction, configurability, readability, test coverage |
|
|
142
|
+
| Requirement Upgrade | Data model extensibility, API compatibility, business rule flexibility, state machine extension |
|
|
143
|
+
| User Growth | Performance bottlenecks, data volume capacity, caching strategy, horizontal scaling, degradation |
|
|
144
|
+
|
|
145
|
+
### Dimension 4: Market Roadmap
|
|
146
|
+
|
|
147
|
+
| Item | Description |
|
|
148
|
+
|------|-------------|
|
|
149
|
+
| Feature Coverage | What's covered vs. uncovered? |
|
|
150
|
+
| Requirement Trends | Historical trends and predictions |
|
|
151
|
+
| Technology Trends | Current stack evolution direction |
|
|
152
|
+
| Competitive Positioning | Gaps vs. industry standards |
|
|
153
|
+
| Short-term (1-3mo) | Immediate action items |
|
|
154
|
+
| Mid-term (3-6mo) | Strategic initiatives |
|
|
155
|
+
| Long-term (6-12mo) | Vision and goals |
|
|
156
|
+
|
|
157
|
+
### Dimension 5: Requirement-Code Deviation
|
|
158
|
+
|
|
159
|
+
| Deviation Type | Description |
|
|
160
|
+
|----------------|-------------|
|
|
161
|
+
| Feature Gap | Required but not implemented |
|
|
162
|
+
| Over-implementation | Implemented but not required |
|
|
163
|
+
| Understanding Gap | Implementation doesn't match intent |
|
|
164
|
+
| Technical Compromise | Requirement degraded due to tech limits |
|
|
165
|
+
| Requirement Creep | Requirement silently expanded |
|
|
166
|
+
| Requirement Shrink | Requirement silently reduced |
|
|
167
|
+
| Documentation Lag | Code changed, docs not updated |
|
|
168
|
+
|
|
169
|
+
### Dimension 6: Upgrade Vulnerability
|
|
170
|
+
|
|
171
|
+
| Vulnerability Type | Description |
|
|
172
|
+
|--------------------|-------------|
|
|
173
|
+
| Data Model Fragility | Schema changes may cause migration issues |
|
|
174
|
+
| API Incompatibility | Interface changes may break clients |
|
|
175
|
+
| Hardcoded Traps | Hardcoded rules need code changes to modify |
|
|
176
|
+
| State Machine Deadlock | State transitions may create illegal states |
|
|
177
|
+
| Performance Bottleneck | Feature upgrades amplify existing perf issues |
|
|
178
|
+
| Test Blind Spots | Untested modules have highest upgrade risk |
|
|
179
|
+
| Dependency Coupling | Tight coupling causes cascade changes |
|
|
180
|
+
|
|
181
|
+
## Learning Integration
|
|
182
|
+
|
|
183
|
+
This skill supports FlowMind learning:
|
|
184
|
+
|
|
185
|
+
- **Analysis Focus**: Learns which dimensions you care about most
|
|
186
|
+
- **Severity Threshold**: Learns your risk tolerance
|
|
187
|
+
- **Report Format**: Learns preferred report detail level
|
|
188
|
+
|
|
189
|
+
## Examples
|
|
190
|
+
|
|
191
|
+
### Example 1: Full Requirement Analysis
|
|
192
|
+
|
|
193
|
+
```
|
|
194
|
+
User: ๅฏนๅฝๅ้กน็ฎๅไธๆฌกๅ
จ้ข้ๆฑๅๆ
|
|
195
|
+
|
|
196
|
+
FlowMind:
|
|
197
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
198
|
+
โ Requirement Analysis Report โ
|
|
199
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
|
|
200
|
+
โ Project: order-service โ
|
|
201
|
+
โ Analysis Scope: All 6 dimensions โ
|
|
202
|
+
โ Overall Score: 72/100 โ
|
|
203
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
|
|
204
|
+
โ Dimension Scores: โ
|
|
205
|
+
โ โข Historical Design: 75/100 โ
|
|
206
|
+
โ โข Iteration Rationale: 80/100 โ
|
|
207
|
+
โ โข Extensibility: 65/100 โ
|
|
208
|
+
โ โข Market Roadmap: 70/100 โ
|
|
209
|
+
โ โข Req-Code Deviation: 68/100 โ
|
|
210
|
+
โ โข Upgrade Vulnerability: 62/100 โ
|
|
211
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
|
|
212
|
+
โ Key Findings: โ
|
|
213
|
+
โ โข Order state machine lacks extensibility โ
|
|
214
|
+
โ โข 3 features have requirement-code deviation โ
|
|
215
|
+
โ โข Redis caching strategy needs redesign for scale โ
|
|
216
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
|
|
217
|
+
โ P0: Fix state machine deadlocks in refund flow โ
|
|
218
|
+
โ P1: Align 3 deviated features with requirements โ
|
|
219
|
+
โ P2: Redesign Redis caching for 10x user growth โ
|
|
220
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
### Example 2: Upgrade Risk Assessment
|
|
224
|
+
|
|
225
|
+
```
|
|
226
|
+
User: ่ฏไผฐไธไธ้ๆฑๅ็บง็้ฃ้ฉ
|
|
227
|
+
|
|
228
|
+
FlowMind:
|
|
229
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
230
|
+
โ Upgrade Vulnerability Report โ
|
|
231
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
|
|
232
|
+
โ Vulnerabilities Found: 8 โ
|
|
233
|
+
โ โข HIGH: 2 โ
|
|
234
|
+
โ โข MEDIUM: 3 โ
|
|
235
|
+
โ โข LOW: 3 โ
|
|
236
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
|
|
237
|
+
โ ๐ด HIGH: Order status enum hardcoded (OrderService) โ
|
|
238
|
+
โ Impact: All order operations โ
|
|
239
|
+
โ Fix: Extract to configuration โ
|
|
240
|
+
โ โ
|
|
241
|
+
โ ๐ด HIGH: No index on order_items.product_id โ
|
|
242
|
+
โ Impact: Query performance at scale โ
|
|
243
|
+
โ Fix: Add composite index โ
|
|
244
|
+
โ โ
|
|
245
|
+
โ ๐ก MEDIUM: Payment API v1 deprecated โ
|
|
246
|
+
โ Impact: Payment processing โ
|
|
247
|
+
โ Fix: Migrate to v2 API โ
|
|
248
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
## Configuration
|
|
252
|
+
|
|
253
|
+
```json
|
|
254
|
+
{
|
|
255
|
+
"requirement-analyst": {
|
|
256
|
+
"dimensions": {
|
|
257
|
+
"historicalDesign": true,
|
|
258
|
+
"iterationRationale": true,
|
|
259
|
+
"extensibility": true,
|
|
260
|
+
"marketRoadmap": true,
|
|
261
|
+
"reqCodeDeviation": true,
|
|
262
|
+
"upgradeVulnerability": true
|
|
263
|
+
},
|
|
264
|
+
"scoringWeights": {
|
|
265
|
+
"historicalDesign": 0.15,
|
|
266
|
+
"iterationRationale": 0.15,
|
|
267
|
+
"extensibility": 0.20,
|
|
268
|
+
"marketRoadmap": 0.15,
|
|
269
|
+
"reqCodeDeviation": 0.15,
|
|
270
|
+
"upgradeVulnerability": 0.20
|
|
271
|
+
},
|
|
272
|
+
"reportFormat": "detailed"
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
```
|