flowmind 1.4.7 → 1.5.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/README.md CHANGED
@@ -11,928 +11,82 @@
11
11
  [![npm version](https://img.shields.io/npm/v/flowmind.svg)](https://www.npmjs.com/package/flowmind)
12
12
  [![npm downloads](https://img.shields.io/npm/dw/flowmind.svg)](https://www.npmjs.com/package/flowmind)
13
13
 
14
- [中文](README_CN.md) | [Quick Start](#-quick-start) | [Demo](demo/DEMO.md) | [Integration](docs/integration-guide.md) | [How It Works](#-how-it-works) | [Use Cases](#-use-cases) | [Architecture](#-architecture)
14
+ [中文](README_CN.md) | [Quick Start](#quick-start) | [Demo](demo/DEMO.md) | [Detailed Guide](docs/guide.md) | [Integration](docs/integration-guide.md) | [Changelog](CHANGELOG.md)
15
15
 
16
16
  </div>
17
17
 
18
18
  ---
19
19
 
20
- ## Why Install It
20
+ ## What It Is
21
21
 
22
- FlowMind helps you **teach a repeatable developer workflow once and reuse it later**.
22
+ FlowMind is a memory layer for repeatable developer workflows.
23
23
 
24
- It is built for engineers who already use `MCP`, `Codex`, `Claude Code`, or scriptable CLI workflows and want three things:
24
+ Use it when you already have tools and want a better execution surface:
25
25
 
26
- - A stable way to route tasks to reusable skills
27
- - A memory layer for explicit feedback and preferences
28
- - A CLI/MCP entrypoint instead of retyping the same instructions every time
29
-
30
- The shortest description is:
31
-
32
- > FlowMind is a memory layer for repeatable developer operations.
33
-
34
- ## 30-Second Demo
35
-
36
- For a longer walkthrough, see [demo/DEMO.md](demo/DEMO.md).
37
-
38
- Animated terminal walkthrough:
39
-
40
- ![FlowMind terminal demo](https://raw.githubusercontent.com/Eleven-M/flowmind/master/demo/flowmind-demo.gif)
41
-
42
- ```bash
43
- # 1. Install
44
- npm install -g flowmind
45
-
46
- # 2. Inspect available skills
47
- flowmind skills --json
48
-
49
- # 3. Run a real workflow through the log-audit skill
50
- flowmind process --skill log-audit "查询 traceId abc123 的日志"
51
-
52
- # 4. Give explicit feedback
53
- flowmind "下次用表格格式"
54
-
55
- # 5. Programmatic / Codex-friendly access
56
- flowmind-codex --skill log-audit "查询 traceId abc123 的日志"
57
- ```
58
-
59
- What you get immediately:
60
- - Reusable skill execution
61
- - Explicit feedback capture
62
- - Local learning and preference reuse
63
- - Codex-friendly CLI access
26
+ - Route recurring tasks through reusable skills
27
+ - Capture explicit feedback and reuse it later
28
+ - Run the same workflow from CLI, Codex, or MCP clients
64
29
 
65
30
  Best-fit use cases today:
31
+
66
32
  - Log and trace investigation
67
- - Review workflows with fixed standards
68
- - Internal tool orchestration through MCP-compatible adapters
33
+ - Code review with fixed standards
34
+ - Data validation and internal tool orchestration
69
35
 
70
36
  ## Quick Start
71
37
 
72
38
  ```bash
73
39
  npm install -g flowmind
74
- flowmind init
75
- flowmind skills --json
76
- flowmind process --skill log-audit "查询 traceId abc123 的日志"
77
- ```
78
-
79
- If you want to try it without a global install:
80
-
81
- ```bash
82
- npx flowmind@latest skills
83
- npx flowmind@latest doctor
84
- ```
85
-
86
- If you want the fastest first success, start here:
87
-
88
- ```bash
89
40
  flowmind doctor
90
41
  flowmind skills
91
42
  flowmind process --skill log-audit "query the latest error logs"
92
43
  ```
93
44
 
94
- If you are integrating with Codex or scripts:
45
+ If you want Codex-friendly JSON output:
95
46
 
96
47
  ```bash
97
48
  flowmind-codex skills
98
49
  flowmind-codex --skill log-audit "查询 traceId abc123 的日志"
99
50
  ```
100
51
 
101
- FlowMind stores learning data locally and reuses explicit feedback on future runs.
102
-
103
- Need integration examples for Claude Code, Codex, Cursor, or MCP clients? See [docs/integration-guide.md](docs/integration-guide.md).
104
-
105
- ## Who It Is For
106
-
107
- - Teams using MCP-based internal tools
108
- - Engineers repeatedly doing log analysis, review, validation, or doc sync work
109
- - Codex or Claude Code users who want repeatable workflows instead of prompt repetition
110
-
111
- ## Why It Converts Better Than Raw Prompts
112
-
113
- - Skills define a stable execution path
114
- - Feedback becomes reusable state instead of chat history
115
- - CLI and MCP entrypoints make the workflow scriptable
116
- - Provider switching stays in config instead of in prompt text
117
-
118
- ---
119
-
120
- ## 🧠 How It Works
121
-
122
- ### 1. Multi-Source Code Location
123
-
124
- ```mermaid
125
- graph LR
126
- A[Your Request] --> B{Code Location}
127
- B -->|Local| C[Local Codebase]
128
- B -->|MCP| D[Remote Repository]
129
- B -->|SSH| E[Server Code]
130
- C --> F[Smart Matching]
131
- D --> F
132
- E --> F
133
- F --> G[Precise Location]
134
- ```
135
-
136
- **Supported Modes:**
137
- - 📁 **Local Mode** - Directly read local codebase
138
- - 🔌 **MCP Mode** - Connect remote repositories via MCP protocol
139
- - 🔐 **SSH Mode** - SSH connection to read server code
140
-
141
- ### 2. RAG Intelligent Retrieval
142
-
143
- ```mermaid
144
- graph TD
145
- A[Historical Data Collection] --> B[Knowledge Base Building]
146
- B --> C[Intelligent Retrieval Matching]
147
- C --> D[Context Generation]
148
- D --> E[Auto Application]
149
- E --> F[Continuous Optimization]
150
- F --> A
151
- ```
152
-
153
- **RAG Process:**
154
- - 📚 **Data Collection** - Collect historical learning records, workflows, best practices
155
- - 🔍 **Smart Matching** - Based on scene similarity calculation, recommend best matching workflows
156
- - 📝 **Context Generation** - Auto-generate context, reduce repetitive input
157
- - 🔄 **Continuous Optimization** - Every use optimizes matching algorithms
158
-
159
- ### 3. Learning Feedback Mechanism
160
-
161
- ```mermaid
162
- graph LR
163
- A[Your Request] --> B[FlowMind Executes]
164
- B --> C{You Correct?}
165
- C -->|Yes| D[Record Learning]
166
- C -->|No| E[Continue]
167
- D --> F[Apply Next Time]
168
- F --> G[Self Evolution]
169
- ```
170
-
171
- **Learning Types:**
172
- - 📚 **Correction Learning** - "No, use table format" → Auto-remembered
173
- - 🗺️ **Scene Learning** - "Check errors first then traces" → Workflow recorded
174
- - ⚙️ **Preference Learning** - "Reply in Chinese" → Language preference saved
175
- - 🔄 **Auto Application** - Automatically uses learned workflows next time
176
-
177
- ### 4. Pluggable Component Architecture
178
-
179
- FlowMind uses a **pluggable component architecture** that supports switching between cloud providers (Alibaba Cloud, Baidu Cloud, ELK, etc.) through configuration, without modifying skill code.
180
-
181
- ```mermaid
182
- graph TB
183
- A[FlowMind Core] --> R[ComponentRegistry]
184
- R --> LS[logService]
185
- R --> DB[databaseManager]
186
- R --> DQ[databaseQuery]
187
- R --> RD[redisMonitor]
188
- R --> AP[apiDoc]
189
- R --> KB[knowledgeBase]
190
- R --> WF[workflow]
191
- R --> RP[report]
192
-
193
- LS --> LS1[Alibaba Cloud SLS]
194
- LS --> LS2[Baidu Cloud Log]
195
- LS --> LS3[ELK]
196
- DB --> DB1[Alibaba Cloud DMS]
197
- KB --> KB1[Yuque]
198
- KB --> KB2[Notion]
199
- AP --> AP1[YApi]
200
- ```
201
-
202
- **8 Component Types:**
203
-
204
- | Component Type | Default Provider | Description |
205
- |----------------|------------------|-------------|
206
- | `logService` | aliyun-sls | Cloud log querying and analysis |
207
- | `databaseManager` | aliyun-dms | Database instance management |
208
- | `databaseQuery` | aliyun-rds-query | Direct database SQL queries |
209
- | `redisMonitor` | aliyun-redis | Redis monitoring via Prometheus |
210
- | `apiDoc` | yapi | API documentation management |
211
- | `knowledgeBase` | yuque | Knowledge base and documents |
212
- | `workflow` | friday-flow | Automated workflow and pipelines |
213
- | `report` | friday-report | Test and coverage reporting |
214
-
215
- **Switching providers is config-only:**
216
-
217
- ```json
218
- {
219
- "components": {
220
- "logService": {
221
- "default": "baidu-sls",
222
- "providers": {
223
- "baidu-sls": { "adapter": "baidu-sls-adapter", "enabled": true }
224
- }
225
- }
226
- }
227
- }
228
- ```
229
-
230
- ---
231
-
232
- ## 📊 Use Cases
233
-
234
- ### Scenario 1: Online Problem Investigation
235
-
236
- ```bash
237
- # Traditional way (10+ steps):
238
- 1. Login to SLS console
239
- 2. Enter query conditions
240
- 3. Find traceId
241
- 4. Copy traceId
242
- 5. Search traces
243
- 6. Locate error
244
- 7. Connect RDS
245
- 8. Query data
246
- 9. Analyze cause
247
- 10. Modify code
248
- 11. Submit deployment
249
- 12. Write documentation
250
-
251
- # FlowMind way (1 command):
252
- flowmind "排查线上问题 traceId abc123"
253
- # → Auto complete: SLS query → Trace tracking → RDS data validation → Code location → Fix suggestion
254
- ```
255
-
256
- ### Scenario 2: Code Review
257
-
258
- ```bash
259
- # Set your standards (only once)
260
- flowmind "代码审查先检查安全漏洞,再检查代码质量,最后检查性能"
261
-
262
- # Every review follows your standards
263
- flowmind "审查这个 PR"
264
- # → Security first → Quality check → Performance analysis
265
- ```
266
-
267
- ### Scenario 3: API Documentation Sync
268
-
269
- ```bash
270
- # Generate docs from code
271
- flowmind "从代码注释生成 API 文档"
272
-
273
- # Sync to YApi
274
- flowmind "同步接口到 YApi"
275
-
276
- # Auto update Yuque
277
- flowmind "同步 API 文档到语雀"
278
- ```
279
-
280
- ### Scenario 4: Data Validation
281
-
282
- ```bash
283
- # Connect RDS to validate data
284
- flowmind "验证订单表数据完整性"
285
-
286
- # Auto execute checks
287
- # → Referential integrity → Data types → Business logic → State machine
288
- ```
289
-
290
- ### Scenario 5: Project Health Check
291
-
292
- ```bash
293
- # Full review
294
- flowmind "审查项目整体状况"
295
-
296
- # Auto execute:
297
- # → Dependency analysis → Security audit → Code complexity → Test coverage → Technical debt
298
- ```
299
-
300
- ### Scenario 6: Project Onboarding
301
-
302
- ```bash
303
- # New to a project? FlowMind helps you understand fast
304
- flowmind "帮我理解这个项目的整体架构"
305
-
306
- # FlowMind learns from senior devs' patterns:
307
- # → Project structure analysis → Core module explanation → Data flow mapping
308
- # → Key design decisions → Development guidelines → Suggested learning path
309
- ```
310
-
311
- ### Scenario 7: Design & Architecture Guidance
312
-
313
- ```bash
314
- # Facing a design choice? FlowMind draws from accumulated experience
315
- flowmind "这个功能应该用 Redis 还是 MongoDB?"
316
-
317
- # FlowMind applies learned design thinking:
318
- # → Your project context → Current tech stack → Performance requirements
319
- # → Historical similar decisions → Trade-off analysis → Data-driven recommendation
320
- ```
321
-
322
- ---
323
-
324
- ## 📖 CLI Reference
325
-
326
- ### Skill Management
327
-
328
- ```bash
329
- # List all available skills
330
- flowmind skills
331
- flowmind skills --verbose # Show detailed info
332
- flowmind skills --json # JSON output (for tool integration)
333
- flowmind skills --category quality # Filter by category
334
-
335
- # View single skill info
336
- flowmind skill log-audit
337
- flowmind skill log-audit --json # JSON output
338
- flowmind skill log-audit --read # Read SKILL.md content
339
- flowmind skill log-audit --config # Show configuration
340
-
341
- # Modify skill configuration
342
- flowmind skill log-audit --set defaultFormat sequential-list
343
- flowmind skill code-review --set security.enabled true
344
- ```
345
-
346
- ### Resource Management
347
-
348
- ```bash
349
- # List resource files
350
- flowmind resource --list
351
- flowmind resource --list learning
352
- flowmind resource --list --json # JSON output
353
-
354
- # View/edit files
355
- flowmind resource --show config.json
356
- flowmind resource --edit config.json
357
-
358
- # Show resource configuration
359
- flowmind resource --config
360
- flowmind resource --config --json
361
- ```
362
-
363
- ### Other Commands
52
+ If you prefer `npx`:
364
53
 
365
54
  ```bash
366
- # Process request
367
- flowmind process "your request"
368
- flowmind process --skill log-audit "query logs"
369
-
370
- # Manage learning
371
- flowmind learn --list
372
- flowmind learn --export learnings.json
373
-
374
- # Scene management
375
- flowmind scenes --list
376
- flowmind scenes --add
377
-
378
- # Show statistics
379
- flowmind stats
380
-
381
- # Configuration
382
- flowmind config --list
383
- flowmind config --set learning.enabled true
384
- ```
385
-
386
- ### Tool Integration (Codex/Claude)
387
-
388
- All commands support `--json` flag for programmatic access:
389
-
390
- ```bash
391
- # Get skills list as JSON
392
- flowmind skills --json
393
-
394
- # Get skill info as JSON
395
- flowmind skill log-audit --json
396
-
397
- # Get resource list as JSON
398
- flowmind resource --list --json
399
- ```
400
-
401
- ---
402
-
403
- ## 🏗️ Architecture
404
-
405
- ### System Architecture
406
-
407
- ```
408
- ┌──────────────────────────────────────────────────────────────────┐
409
- │ FlowMind Agent │
410
- ├──────────────────────────────────────────────────────────────────┤
411
- │ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
412
- │ │ Scene Matcher│ │Learning Engine│ │ Skill Loader │ │
413
- │ └──────────────┘ └──────────────┘ └──────────────┘ │
414
- ├──────────────────────────────────────────────────────────────────┤
415
- │ ┌──────────────────────────────────────────────────────────┐ │
416
- │ │ ComponentRegistry (Pluggable) │ │
417
- │ ├──────────┬──────────┬──────────┬──────────┬──────────────┤ │
418
- │ │logService│database │apiDoc │knowledge │workflow/report│ │
419
- │ │Adapter │Manager │Adapter │Base │Adapters │ │
420
- │ └──────────┴──────────┴──────────┴──────────┴──────────────┘ │
421
- ├──────────────────────────────────────────────────────────────────┤
422
- │ ┌──────────────────────────────────────────────────────────┐ │
423
- │ │ Skill System │ │
424
- │ ├─────────────┬─────────────┬─────────────┬────────────────┤ │
425
- │ │ Analysis │ Integration │ Quality │ Automation │ │
426
- │ └─────────────┴─────────────┴─────────────┴────────────────┘ │
427
- ├──────────────────────────────────────────────────────────────────┤
428
- │ ┌──────────────────────────────────────────────────────────┐ │
429
- │ │ Cloud Provider Adapters │ │
430
- │ ├──────────┬──────────┬──────────┬──────────┬──────────────┤ │
431
- │ │Aliyun SLS│Aliyun DMS│ YApi │ Yuque │Friday Flow │ │
432
- │ │Baidu Log │Baidu DMS │ Swagger │ Notion │Friday Report │ │
433
- │ │ELK │Custom DB │ │Confluence│ │ │
434
- │ └──────────┴──────────┴──────────┴──────────┴──────────────┘ │
435
- ├──────────────────────────────────────────────────────────────────┤
436
- │ ┌──────────────────────────────────────────────────────────┐ │
437
- │ │ Data Persistence Layer │ │
438
- │ ├─────────────┬─────────────┬───────────────────────────────┤ │
439
- │ │Learning │Scene │Component Config │ │
440
- │ │Records │Mappings │& Settings │ │
441
- │ └─────────────┴─────────────┴───────────────────────────────┘ │
442
- └──────────────────────────────────────────────────────────────────┘
443
- ```
444
-
445
- ### Directory Structure
446
-
447
- ```
448
- flowmind/
449
- ├── core/ # Core Engine
450
- │ ├── index.js # Main entry
451
- │ ├── learning-engine.js # Learning engine
452
- │ ├── scene-matcher.js # Scene matching
453
- │ ├── skill-loader.js # Skill loading
454
- │ ├── config-manager.js # Config management
455
- │ ├── component-types.js # Component type definitions
456
- │ ├── component-registry.js # Pluggable component registry
457
- │ ├── mcp-compatibility.js # MCP backward compatibility
458
- │ ├── adapters/ # Adapter interfaces
459
- │ │ ├── base-adapter.js # Abstract base adapter
460
- │ │ ├── mcp-adapter.js # MCP adapter base
461
- │ │ ├── log-service-adapter.js
462
- │ │ ├── database-manager-adapter.js
463
- │ │ ├── database-query-adapter.js
464
- │ │ ├── knowledge-base-adapter.js
465
- │ │ ├── api-doc-adapter.js
466
- │ │ ├── workflow-adapter.js
467
- │ │ └── report-adapter.js
468
- │ └── providers/ # Provider implementations
469
- │ ├── aliyun/ # Alibaba Cloud adapters
470
- │ │ ├── sls-adapter.js
471
- │ │ ├── dms-adapter.js
472
- │ │ └── redis-adapter.js
473
- │ ├── yapi/ # YApi adapter
474
- │ │ └── yapi-adapter.js
475
- │ ├── yuque/ # Yuque adapter
476
- │ │ └── yuque-adapter.js
477
- │ └── friday/ # Friday platform adapters
478
- │ ├── flow-adapter.js
479
- │ └── report-adapter.js
480
- ├── scripts/ # Migration tools
481
- │ └── migrate-config.js # Config migration tool
482
- ├── skills/ # Skill Modules (17 core skills)
483
- │ ├── log-audit/ # Log audit
484
- │ ├── sls-log-audit/ # SLS log audit (chain tracing)
485
- │ ├── resource-bind/ # Resource binding
486
- │ ├── code-review/ # Code review
487
- │ ├── code-review-audit/ # Code review audit (3D review)
488
- │ ├── data-validation/ # Data validation
489
- │ ├── data-logic-validation/ # Data logic validation
490
- │ ├── api-sync/ # API sync
491
- │ ├── yapi-sync-interface/ # YApi interface sync
492
- │ ├── yuque-sync-design/ # Yuque design doc sync
493
- │ ├── project-review/ # Project review
494
- │ ├── git-review/ # Git review
495
- │ ├── archive-change/ # Change archiving
496
- │ ├── auto-flow/ # Workflow automation
497
- │ ├── learning-engine/ # Learning engine
498
- │ ├── learning-feedback/ # Learning feedback (global)
499
- │ └── requirement-analyst/ # Requirement analyst (6D analysis)
500
- ├── learning/ # Learning Storage
501
- │ ├── records/ # Learning records
502
- │ └── scenes.json # Scene mappings
503
- ├── templates/ # Output templates
504
- └── config/ # Configuration files
505
- ```
506
-
507
- ### Learning Flow
508
-
509
- ```mermaid
510
- sequenceDiagram
511
- participant U as User
512
- participant A as FlowMind Agent
513
- participant M as Scene Matcher
514
- participant L as Learning Engine
515
- participant S as Skill System
516
- participant MCP as MCP Integration
517
- participant D as Data Persistence
518
-
519
- U->>A: Send request
520
- A->>M: Check scene mappings
521
- M->>D: Read history records
522
- D-->>M: Return matching workflows
523
- M-->>A: Return recommended plan
524
-
525
- A->>S: Execute skills
526
- S->>MCP: Call external services
527
- MCP-->>S: Return results
528
- S-->>A: Return execution results
529
-
530
- A->>U: Present results
531
-
532
- U->>A: Provide feedback
533
- A->>L: Record learning
534
- L->>D: Persist storage
535
- L->>L: Optimize matching algorithm
536
- ```
537
-
538
- ### One-Stop Problem Solving Flow
539
-
540
- ```mermaid
541
- graph TB
542
- A[Problem Discovery] --> B[Code Location]
543
- B --> C[Data Validation]
544
- C --> D[Problem Analysis]
545
- D --> E[One-Click Fix]
546
- E --> F[Auto Deploy]
547
- F --> G[Archive Record]
548
-
549
- B --> B1[Local Code]
550
- B --> B2[MCP Remote]
551
- B --> B3[SSH Mode]
552
-
553
- C --> C1[RDS Data Read]
554
- C --> C2[Data Integrity Validation]
555
-
556
- D --> D1[SLS Log Analysis]
557
- D --> D2[TraceID Tracing]
558
- D --> D3[Root Cause Location]
559
-
560
- E --> E1[Code Modification]
561
- E --> E2[Unit Tests]
562
-
563
- F --> F1[Pipeline Execution]
564
- F --> F2[Auto Deployment]
565
-
566
- G --> G1[OpenSpec Archive]
567
- G --> G2[Yuque Doc Sync]
568
- G --> G3[RAG Data Building]
569
- ```
570
-
571
- ---
572
-
573
- ## ✨ Features
574
-
575
- ### 🏗️ Core Architecture
576
-
577
- FlowMind is built on **enterprise-grade architecture design standards**, incorporating extensive experience from architects and senior developers:
578
-
579
- - 📐 **OpenSpec Design Standards** - Standardized skill definitions and interface specifications
580
- - 🧠 **RAG Business Logic** - Intelligent retrieval and generation based on historical data
581
- - 💾 **Data Persistence** - All learning records and configurations stored locally
582
- - ⚙️ **Global Config Initialization** - One-time setup, permanent effect, no repeated configuration
583
- - 🔌 **Pluggable Components** - Switch cloud providers (Alibaba Cloud, Baidu Cloud, ELK, etc.) via config without code changes
584
-
585
- ### 🔧 Skill System (17 Core Skills)
586
-
587
- #### 📊 Analysis Skills
588
-
589
- | Skill | Description |
590
- |-------|-------------|
591
- | 🔍 **log-audit** | Log Audit - Time filtering, service filtering, level filtering, keyword search, TraceID tracing, performance analysis |
592
- | 🔗 **sls-log-audit** | SLS Log Audit - Alibaba Cloud SLS log query, TraceID chain analysis, Feign call chain extraction, response time analysis |
593
- | 🔎 **project-review** | Project Review - Dependency analysis, security audit, license compliance, code complexity, test coverage, technical debt assessment |
594
- | 📋 **git-review** | Git Review - Commit quality analysis, change size assessment, impact analysis, risk evaluation, dependency change detection |
595
- | 📐 **requirement-analyst** | Requirement Analyst - Historical design principles, iteration rationale, extensibility, market roadmap, req-code deviation, upgrade vulnerabilities |
596
-
597
- #### 🔌 Integration Skills
598
-
599
- | Skill | Description |
600
- |-------|-------------|
601
- | 🔗 **resource-bind** | Resource Bind - MySQL/PostgreSQL connection management, Redis operations, REST API integration, authentication management |
602
- | 📚 **api-sync** | API Sync - Generate docs from code annotations, OpenAPI/Swagger spec generation, client SDK generation, version management |
603
- | 📋 **yapi-sync-interface** | YApi Interface Sync - Sync Controller interfaces to YApi, Swagger import/export, interface management |
604
- | 📖 **yuque-sync-design** | Yuque Design Sync - Sync OpenSpec design docs to Yuque, knowledge base management, document archiving |
605
- | ✅ **data-validation** | Data Validation - Referential integrity checks, data type validation, business logic verification, state machine validation, duplicate detection |
606
- | 🔬 **data-logic-validation** | Data Logic Validation - Verify actual SQL queries and Redis logic via MCP database/Redis connections |
607
-
608
- #### 🛠️ Quality Skills
609
-
610
- | Skill | Description |
611
- |-------|-------------|
612
- | 🔒 **code-review** | Code Review - SQL injection detection, XSS vulnerability scanning, authentication issues, code style, complexity analysis, design pattern checks |
613
- | 🛡️ **code-review-audit** | Code Review Audit - Three-dimensional review: security audit, design compliance, mandatory constraint validation before merge/test |
614
- | 📝 **archive-change** | Archive Change - Archive completed changes, auto-generate change summary, update changelog, create knowledge base entries, link Issue/PR |
615
-
616
- #### ⚡ Automation Skills
617
-
618
- | Skill | Description |
619
- |-------|-------------|
620
- | 🔄 **auto-flow** | Auto Flow - Sequential execution, parallel execution, conditional branching, error handling, workflow templates, team sharing |
621
-
622
- #### 🧠 Intelligence Skills
623
-
624
- | Skill | Description |
625
- |-------|-------------|
626
- | 🎯 **learning-engine** | Learning Engine - Correction learning, scene learning, preference learning, auto-application, learning loop, knowledge graph construction |
627
- | 📝 **learning-feedback** | Learning Feedback (Global) - Capture user corrections, scene mapping, auto-bind to relevant skills, continuous optimization |
628
-
629
- ### 🎯 Core Capabilities Explained
630
-
631
- #### 1️⃣ OpenSpec Design Standards
632
- ```
633
- Standardized skill definitions → Unified interface specifications → Plug and play
634
- ```
635
- - Each skill has a standard SKILL.md definition file
636
- - Unified trigger conditions, feature descriptions, and examples
637
- - Support for custom skill extensions
638
-
639
- #### 2️⃣ RAG Business Logic
640
- ```
641
- Historical data collection → Intelligent retrieval matching → Context generation → Auto application
642
- ```
643
- - Intelligent matching based on historical learning records
644
- - Scene similarity calculation and recommendations
645
- - Context-aware workflow application
646
-
647
- #### 3️⃣ Data Persistence
648
- ```
649
- Learning records → Local storage → Permanent retention → Cross-session reuse
650
- ```
651
- - All learning records stored locally and persistently
652
- - Configuration information permanently retained
653
- - Support import/export for team sharing
654
-
655
- #### 4️⃣ Global Config Initialization
656
- ```
657
- flowmind init → One-time configuration → Permanent effect
658
- ```
659
- - Run `flowmind init` to complete initialization
660
- - Configure resource connections, learning preferences, output formats
661
- - No need to repeat setup each time
662
-
663
- #### 5️⃣ Learning Feedback Mechanism (Self-Evolution)
664
- ```
665
- User correction → Record learning → Auto apply → Continuous optimization
666
- ```
667
- - **Correction Learning**: "No, use table format" → Auto-remembered
668
- - **Scene Learning**: "Check errors first then traces" → Workflow recorded
669
- - **Preference Learning**: "Reply in Chinese" → Language preference saved
670
- - **Auto Application**: Automatically uses learned workflows next time
671
-
672
- #### 6️⃣ Pluggable Component Architecture (Full Configuration)
673
- ```
674
- Component Type → Provider Interface → Cloud Service Adapter → Switch via Config
675
- ```
676
-
677
- **Key Design Principles:**
678
- - 🔌 **Provider Abstraction** - Each component type defines a standard interface; providers implement the interface
679
- - ⚙️ **Config-Driven Switching** - Switch cloud providers by modifying JSON config, zero code changes
680
- - 🔗 **MCP Backward Compatibility** - Existing MCP server configurations continue to work seamlessly
681
- - 🧩 **Custom Extensibility** - Register your own adapters for proprietary or third-party services
682
-
683
- **Component Lifecycle:**
684
- ```
685
- flowmind init → Load component-config.json → Register adapters → Activate default providers
686
-
687
- Skills call ComponentRegistry.getAdapter(type)
688
-
689
- Adapter delegates to MCP server or custom implementation
690
- ```
691
-
692
- **MCP Server to Component Mapping:**
693
-
694
- | MCP Server | Component Type | Provider |
695
- |------------|----------------|----------|
696
- | `friday-sls-logs` | `logService` | `aliyun-sls` |
697
- | `aliyun-dms-mcp-server` | `databaseManager` | `aliyun-dms` |
698
- | `friday-rds-redis-query` | `databaseQuery` | `aliyun-rds-query` |
699
- | `friday-aliyun-sz-rds-redis` | `redisMonitor` | `aliyun-redis` |
700
- | `yapi-mcp` | `apiDoc` | `yapi` |
701
- | `yuque-mcp` | `knowledgeBase` | `yuque` |
702
- | `friday-auto-flow` | `workflow` | `friday-flow` |
703
- | `friday-auto-report` | `report` | `friday-report` |
704
-
705
- ### 🛠️ Custom Adapter Development
706
-
707
- Create your own adapter to integrate proprietary or third-party services.
708
-
709
- **Step 1: Extend the Base Adapter**
710
-
711
- ```javascript
712
- // core/providers/custom/my-sls-adapter.js
713
- const LogServiceAdapter = require('../../adapters/log-service-adapter');
714
-
715
- class MyCustomSlsAdapter extends LogServiceAdapter {
716
- constructor(config = {}) {
717
- super('my-custom-sls', config);
718
- // Register MCP tool name mappings
719
- this.registerTool('queryLogs', 'myQueryLogsTool');
720
- }
721
-
722
- get mcpServer() {
723
- return 'my-custom-mcp-server';
724
- }
725
-
726
- async queryLogs(params) {
727
- // Custom implementation
728
- return { mcpServer: this.mcpServer, tool: this.resolveTool('queryLogs'), params };
729
- }
730
- }
731
-
732
- module.exports = MyCustomSlsAdapter;
733
- ```
734
-
735
- **Step 2: Register the Provider Factory**
736
-
737
- ```javascript
738
- // In your initialization code
739
- const registry = new ComponentRegistry(config);
740
-
741
- registry.registerFactory('my-custom-sls', () => {
742
- const MyCustomSlsAdapter = require('./providers/custom/my-sls-adapter');
743
- return new MyCustomSlsAdapter(config.get('components.logService.providers.my-custom-sls'));
744
- });
745
- ```
746
-
747
- **Step 3: Configure the Provider**
748
-
749
- ```json
750
- {
751
- "components": {
752
- "logService": {
753
- "default": "my-custom-sls",
754
- "providers": {
755
- "my-custom-sls": {
756
- "adapter": "my-custom-sls-adapter",
757
- "enabled": true,
758
- "mcpServer": "my-custom-mcp-server",
759
- "config": {
760
- "endpoint": "my-sls.example.com"
761
- }
762
- }
763
- }
764
- }
765
- }
766
- }
55
+ npx flowmind@latest doctor
56
+ npx flowmind@latest skills
767
57
  ```
768
58
 
769
- **Adapter Interface Requirements by Component Type:**
59
+ ## Why It Works
770
60
 
771
- | Component Type | Required Methods | Required Capabilities |
772
- |----------------|------------------|----------------------|
773
- | `logService` | `queryLogs()`, `listProjects()` | Log querying and project listing |
774
- | `databaseManager` | `listInstances()`, `executeScript()`, `searchDatabase()` | Instance management and SQL execution |
775
- | `databaseQuery` | `queryExec()`, `fetchSource()`, `fetchTables()` | Direct SQL queries |
776
- | `redisMonitor` | `query()`, `queryRange()`, `getLabelValues()` | Prometheus metric queries |
777
- | `apiDoc` | `searchApis()`, `saveApi()`, `getCategories()` | API doc CRUD |
778
- | `knowledgeBase` | `getRepos()`, `getDocs()`, `createDoc()`, `updateDoc()` | Knowledge base CRUD |
779
- | `workflow` | `listPipelines()`, `startPipelineRun()` | Pipeline management |
780
- | `report` | `listBuilds()`, `getBuildInfo()` | Build report retrieval |
781
-
782
- ### 📦 Configuration Migration Tool
61
+ - Skills provide a stable execution path instead of ad hoc prompts
62
+ - Feedback becomes reusable state instead of chat history
63
+ - CLI and MCP entrypoints make the workflow scriptable
783
64
 
784
- Migrate existing MCP server configurations to the new component architecture.
65
+ ## A Real Example
785
66
 
786
67
  ```bash
787
- # Preview migration (dry run)
788
- node scripts/migrate-config.js --dry-run
789
-
790
- # Generate migration config
791
- node scripts/migrate-config.js
792
-
793
- # Specify custom output path
794
- node scripts/migrate-config.js --output ./my-config.json
795
- ```
796
-
797
- **What it does:**
798
- 1. Reads existing MCP server configuration from `.claude/settings.local.json`
799
- 2. Maps MCP servers to component types using the default mapping table
800
- 3. Generates a `component-config.json` with proper structure
801
-
802
- **Migration output example:**
803
- ```json
804
- {
805
- "version": "1.0.0",
806
- "components": {
807
- "logService": {
808
- "default": "aliyun-sls",
809
- "providers": {
810
- "aliyun-sls": {
811
- "adapter": "aliyun-sls-adapter",
812
- "enabled": true,
813
- "mcpServer": "friday-sls-logs"
814
- }
815
- }
816
- }
817
- }
818
- }
819
- ```
820
-
821
- ---
822
-
823
- ## 📈 Impact & Metrics
824
-
825
- | Metric | Before FlowMind | After FlowMind |
826
- |--------|-----------------|----------------|
827
- | Repetitive instructions | 100% | ~5% |
828
- | Workflow consistency | Variable | 98%+ |
829
- | Problem investigation time | 30+ min | 5 min |
830
- | Onboarding new devs | 2 weeks | 2 days |
831
- | Token consumption | High | Reduce 60%+ |
832
- | Experience retention | Cannot preserve | Permanent reuse |
833
- | Design decision quality | Trial and error | Experience-backed |
834
-
835
- ---
836
-
837
- ## 🌟 Community Building
838
-
839
- **FlowMind's Core Philosophy: More Users, Smarter Together!**
840
-
841
- ### Why We Need You?
842
-
843
- ```
844
- Everyone's work habits → Combined into intelligent knowledge base
845
- Your every use → Makes FlowMind understand developers better
846
- Your every correction → Helps everyone improve efficiency
68
+ flowmind process --skill log-audit "查询 traceId abc123 的日志"
69
+ flowmind "下次用表格格式"
847
70
  ```
848
71
 
849
- ### How to Participate?
850
-
851
- 1. **Use & Feedback** - Use FlowMind daily, tell us what can be better
852
- 2. **Share Workflows** - Share your workflows with team and community
853
- 3. **Contribute Code** - Add skills, improve algorithms, optimize experience
854
- 4. **Spread the Word** - Let more developers know about FlowMind
855
-
856
- ### Benefits of Participation
72
+ On the next similar request, FlowMind can reuse that explicit formatting preference from local learning data.
857
73
 
858
- - 🚀 **Personal Efficiency** - Let FlowMind handle repetitive work
859
- - 🧠 **Collective Wisdom** - Combine experiences from millions of developers
860
- - 🌍 **Open Source Sharing** - All learning成果 shared openly
861
- - 🤝 **Community Recognition** - Contributors permanently recorded
74
+ ## Read By Goal
862
75
 
863
- **Let's build smarter developer tools together!**
76
+ - Need the full product walkthrough: [docs/guide.md](docs/guide.md)
77
+ - Need Claude Code, Codex, Cursor, or MCP setup: [docs/integration-guide.md](docs/integration-guide.md)
78
+ - Want to see terminal output first: [demo/DEMO.md](demo/DEMO.md)
79
+ - Want release history: [CHANGELOG.md](CHANGELOG.md)
864
80
 
865
- ---
866
-
867
- ## 🤝 Contributing
868
-
869
- We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for details.
870
-
871
- ### Ways to Contribute
872
- - 🐛 Report bugs
873
- - 💡 Suggest features
874
- - 📝 Improve docs
875
- - 🛠️ Add skills
876
- - 🌍 Translations
877
- - 🧪 Write tests
878
-
879
- ---
880
-
881
- ## 📄 License
882
-
883
- MIT License - see [LICENSE](LICENSE) for details.
81
+ ## Why This Homepage Is Short
884
82
 
885
- ---
886
-
887
- ## 🎓 Your Team Mentor
888
-
889
- FlowMind becomes a valuable assistant for every role through continuous learning from team experience:
890
-
891
- ### 👨‍💻 For Developers: Quality Control & End-to-End Design
83
+ The npm package page works best as an entry page, not as the entire manual.
84
+ Detailed usage modes, system explanation, and architecture notes now live in the linked docs.
892
85
 
893
- - **Full-Process Design Guidance** - From requirements analysis to architecture design, FlowMind learns team design patterns and provides experience-backed guidance at every step
894
- - **Code Quality Control** - Absorbs team Code Review standards and best practices, providing real-time feedback during development
895
- - **Technical Decision Support** - Based on historical project experience, provides data-backed support for tech stack and architecture decisions
86
+ ## Contributing
896
87
 
897
- ### 🧪 For Testers: Review-Driven Quality & Requirements Alignment
88
+ PRs are welcome. Start with [CONTRIBUTING.md](CONTRIBUTING.md).
898
89
 
899
- - **Code Review Quality Control** - Learns team review standards, helping testers identify potential issues at the code level
900
- - **Requirements Tracing** - Automatically links requirements to code implementation, ensuring complete test coverage without missing edge cases
901
- - **Historical Defect Learning** - Learns from past Bug patterns, identifies high-risk areas proactively for precise test resource allocation
90
+ ## License
902
91
 
903
- ### 📦 For Product Managers: Learn from History, Plan for the Future
904
-
905
- - **Historical Design Analysis** - Traces historical resources and design evolution, helping product understand "why it was designed this way"
906
- - **Upgrade Path Planning** - Based on historical iteration patterns and technical architecture constraints, derives reasonable feature evolution directions
907
- - **Feasibility Assessment** - Combines technical implementation costs with historical experience to inform product decisions
908
-
909
- > *FlowMind doesn't replace anyone—it preserves and transmits team design wisdom, quality standards, and product experience across time and roles, enabling every role to make better decisions standing on the shoulders of those before them.*
910
-
911
- ---
912
-
913
- ## 🙏 Acknowledgments
914
-
915
- Built with:
916
- - Claude AI - Intelligence backbone
917
- - MCP Protocol - Tool integration
918
- - OpenSpec - Design standards
919
- - Open source community - Inspiration and support
920
-
921
- ---
922
-
923
- ## 📞 Contact
924
-
925
- - **GitHub**: [github.com/Eleven-M/flowmind](https://github.com/Eleven-M/flowmind)
926
- - **Email**: 13060993305@163.com
927
-
928
- ---
929
-
930
- <div align="center">
931
-
932
- **[⬆ back to top](#-flowmind)**
933
-
934
- Made with ❤️ by the FlowMind team
935
-
936
- *"Learn once, flow forever"*
937
-
938
- </div>
92
+ MIT. See [LICENSE](LICENSE).