flowmind 1.4.6 → 1.4.8

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