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.
Files changed (47) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +855 -0
  3. package/README_CN.md +854 -0
  4. package/bin/flowmind.js +464 -0
  5. package/core/adapters/api-doc-adapter.js +71 -0
  6. package/core/adapters/base-adapter.js +80 -0
  7. package/core/adapters/database-manager-adapter.js +60 -0
  8. package/core/adapters/database-query-adapter.js +51 -0
  9. package/core/adapters/knowledge-base-adapter.js +75 -0
  10. package/core/adapters/log-service-adapter.js +41 -0
  11. package/core/adapters/mcp-adapter.js +65 -0
  12. package/core/adapters/report-adapter.js +60 -0
  13. package/core/adapters/workflow-adapter.js +62 -0
  14. package/core/component-registry.js +281 -0
  15. package/core/component-types.js +63 -0
  16. package/core/config-manager.js +360 -0
  17. package/core/index.js +223 -0
  18. package/core/learning-engine.js +588 -0
  19. package/core/mcp-compatibility.js +150 -0
  20. package/core/providers/aliyun/dms-adapter.js +98 -0
  21. package/core/providers/aliyun/redis-adapter.js +88 -0
  22. package/core/providers/aliyun/sls-adapter.js +86 -0
  23. package/core/providers/friday/flow-adapter.js +85 -0
  24. package/core/providers/friday/report-adapter.js +83 -0
  25. package/core/providers/yapi/yapi-adapter.js +79 -0
  26. package/core/providers/yuque/yuque-adapter.js +90 -0
  27. package/core/scene-matcher.js +326 -0
  28. package/core/skill-loader.js +291 -0
  29. package/package.json +67 -0
  30. package/scripts/migrate-config.js +153 -0
  31. package/skills/api-sync/SKILL.md +203 -0
  32. package/skills/archive-change/SKILL.md +172 -0
  33. package/skills/auto-flow/SKILL.md +277 -0
  34. package/skills/code-review/SKILL.md +206 -0
  35. package/skills/code-review-audit/SKILL.md +150 -0
  36. package/skills/data-logic-validation/SKILL.md +162 -0
  37. package/skills/data-validation/SKILL.md +210 -0
  38. package/skills/git-review/SKILL.md +190 -0
  39. package/skills/learning-engine/SKILL.md +352 -0
  40. package/skills/learning-feedback/SKILL.md +174 -0
  41. package/skills/log-audit/SKILL.md +226 -0
  42. package/skills/project-review/SKILL.md +196 -0
  43. package/skills/requirement-analyst/SKILL.md +275 -0
  44. package/skills/resource-bind/SKILL.md +222 -0
  45. package/skills/sls-log-audit/SKILL.md +223 -0
  46. package/skills/yapi-sync-interface/SKILL.md +145 -0
  47. package/skills/yuque-sync-design/SKILL.md +157 -0
package/package.json ADDED
@@ -0,0 +1,67 @@
1
+ {
2
+ "name": "flowmind",
3
+ "version": "1.0.0",
4
+ "description": "The AI Agent That Learns How You Work - Stop repeating yourself, FlowMind learns your workflows and applies them automatically.",
5
+ "main": "core/index.js",
6
+ "bin": {
7
+ "flowmind": "./bin/flowmind.js"
8
+ },
9
+ "scripts": {
10
+ "start": "node core/index.js",
11
+ "test": "jest",
12
+ "test:coverage": "jest --coverage",
13
+ "lint": "eslint .",
14
+ "build": "webpack --mode production",
15
+ "dev": "nodemon core/index.js"
16
+ },
17
+ "keywords": [
18
+ "ai-agent",
19
+ "workflow-automation",
20
+ "developer-tools",
21
+ "learning-system",
22
+ "code-review",
23
+ "log-analysis",
24
+ "devops"
25
+ ],
26
+ "author": "FlowMind Technologies",
27
+ "license": "MIT",
28
+ "repository": {
29
+ "type": "git",
30
+ "url": "https://github.com/Eleven-M/flowmind.git"
31
+ },
32
+ "bugs": {
33
+ "url": "https://github.com/Eleven-M/flowmind/issues"
34
+ },
35
+ "homepage": "https://github.com/Eleven-M/flowmind#readme",
36
+ "files": [
37
+ "bin/",
38
+ "core/",
39
+ "skills/",
40
+ "scripts/",
41
+ "templates/",
42
+ "config/",
43
+ "learning/",
44
+ "README.md",
45
+ "README_CN.md",
46
+ "LICENSE",
47
+ "CHANGELOG.md"
48
+ ],
49
+ "engines": {
50
+ "node": ">=18.0.0"
51
+ },
52
+ "dependencies": {
53
+ "commander": "^11.0.0",
54
+ "chalk": "^4.1.2",
55
+ "ora": "^5.4.1",
56
+ "inquirer": "^8.2.6",
57
+ "fs-extra": "^11.1.1",
58
+ "uuid": "^9.0.0"
59
+ },
60
+ "devDependencies": {
61
+ "jest": "^29.7.0",
62
+ "eslint": "^8.50.0",
63
+ "nodemon": "^3.0.1",
64
+ "webpack": "^5.88.0",
65
+ "webpack-cli": "^5.1.4"
66
+ }
67
+ }
@@ -0,0 +1,153 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * FlowMind Configuration Migration Tool
5
+ * Migrates existing MCP server configurations to the new component architecture.
6
+ *
7
+ * Usage:
8
+ * node scripts/migrate-config.js [--dry-run] [--output <path>]
9
+ */
10
+
11
+ const fs = require('fs-extra');
12
+ const path = require('path');
13
+
14
+ const { ComponentType } = require('../core/component-types');
15
+
16
+ // Default MCP server to component provider mapping
17
+ const DEFAULT_MAPPING = {
18
+ 'friday-sls-logs': { type: 'logService', provider: 'aliyun-sls' },
19
+ 'aliyun-dms-mcp-server': { type: 'databaseManager', provider: 'aliyun-dms' },
20
+ 'friday-rds-redis-query': { type: 'databaseQuery', provider: 'aliyun-rds-query' },
21
+ 'friday-aliyun-sz-rds-redis': { type: 'redisMonitor', provider: 'aliyun-redis' },
22
+ 'aomi-yapi-mcp': { type: 'apiDoc', provider: 'yapi' },
23
+ 'aomi-yuque-mcp': { type: 'knowledgeBase', provider: 'yuque' },
24
+ 'friday-auto-flow': { type: 'workflow', provider: 'friday-flow' },
25
+ 'friday-auto-report': { type: 'report', provider: 'friday-report' }
26
+ };
27
+
28
+ // MCP server default configurations
29
+ const SERVER_DEFAULTS = {
30
+ 'friday-sls-logs': {
31
+ config: {
32
+ endpoints: {
33
+ test: 'cn-shenzhen.log.aliyuncs.com',
34
+ prod: 'cn-hongkong.log.aliyuncs.com'
35
+ }
36
+ }
37
+ }
38
+ };
39
+
40
+ function getHomeDir() {
41
+ return process.env.HOME || process.env.USERPROFILE || require('os').homedir();
42
+ }
43
+
44
+ /**
45
+ * Read existing MCP server configuration from settings.
46
+ */
47
+ function readExistingConfig() {
48
+ const settingsPaths = [
49
+ path.join(process.cwd(), '.claude', 'settings.local.json'),
50
+ path.join(getHomeDir(), '.claude', 'settings.local.json')
51
+ ];
52
+
53
+ for (const settingsPath of settingsPaths) {
54
+ if (fs.existsSync(settingsPath)) {
55
+ try {
56
+ const settings = fs.readJsonSync(settingsPath);
57
+ return settings.enabledMcpjsonServers || [];
58
+ } catch (e) {
59
+ // skip
60
+ }
61
+ }
62
+ }
63
+
64
+ return [];
65
+ }
66
+
67
+ /**
68
+ * Generate component config from enabled MCP servers.
69
+ */
70
+ function generateComponentConfig(enabledServers) {
71
+ const components = {};
72
+
73
+ for (const serverName of enabledServers) {
74
+ const mapping = DEFAULT_MAPPING[serverName];
75
+ if (!mapping) continue;
76
+
77
+ const { type, provider } = mapping;
78
+
79
+ if (!components[type]) {
80
+ components[type] = {
81
+ default: provider,
82
+ providers: {}
83
+ };
84
+ }
85
+
86
+ components[type].providers[provider] = {
87
+ adapter: `${provider}-adapter`,
88
+ enabled: true,
89
+ mcpServer: serverName,
90
+ ...(SERVER_DEFAULTS[serverName] || {})
91
+ };
92
+ }
93
+
94
+ return components;
95
+ }
96
+
97
+ /**
98
+ * Main migration function.
99
+ */
100
+ async function migrate() {
101
+ const args = process.argv.slice(2);
102
+ const dryRun = args.includes('--dry-run');
103
+ const outputIdx = args.indexOf('--output');
104
+ const outputPath = outputIdx >= 0 ? args[outputIdx + 1] : null;
105
+
106
+ console.log('FlowMind Configuration Migration Tool');
107
+ console.log('=====================================\n');
108
+
109
+ // 1. Read existing config
110
+ const enabledServers = readExistingConfig();
111
+ console.log(`Found ${enabledServers.length} enabled MCP servers:`);
112
+ enabledServers.forEach(s => console.log(` - ${s}`));
113
+ console.log('');
114
+
115
+ // 2. Generate component config
116
+ const components = generateComponentConfig(enabledServers);
117
+
118
+ // 3. Build full config
119
+ const config = {
120
+ version: '1.0.0',
121
+ components
122
+ };
123
+
124
+ // 4. Output
125
+ const configJson = JSON.stringify(config, null, 2);
126
+
127
+ if (dryRun) {
128
+ console.log('Generated component configuration (dry run):');
129
+ console.log(configJson);
130
+ } else {
131
+ const targetPath = outputPath || path.join(getHomeDir(), '.flowmind', 'component-config.json');
132
+ await fs.ensureDir(path.dirname(targetPath));
133
+ await fs.writeJson(targetPath, config, { spaces: 2 });
134
+ console.log(`Component configuration written to: ${targetPath}`);
135
+ }
136
+
137
+ // 5. Summary
138
+ console.log('\nMigration Summary:');
139
+ console.log(` Component types configured: ${Object.keys(components).length}`);
140
+ for (const [type, cfg] of Object.entries(components)) {
141
+ const providers = Object.keys(cfg.providers);
142
+ console.log(` - ${type}: ${cfg.default} (${providers.join(', ')})`);
143
+ }
144
+
145
+ if (!dryRun) {
146
+ console.log('\nNext steps:');
147
+ console.log(' 1. Review the generated configuration file');
148
+ console.log(' 2. Add component config to your flowmind.config.json');
149
+ console.log(' 3. Skills will now use the component registry for service access');
150
+ }
151
+ }
152
+
153
+ migrate().catch(console.error);
@@ -0,0 +1,203 @@
1
+ ---
2
+ name: api-sync
3
+ description: API documentation synchronization skill for FlowMind. Sync API definitions, generate documentation, and maintain API consistency.
4
+ metadata:
5
+ version: "1.0.0"
6
+ author: flowmind
7
+ category: documentation
8
+ ---
9
+
10
+ # API Sync Skill
11
+
12
+ Sync API definitions, generate documentation, and maintain API consistency.
13
+
14
+ ## Features
15
+
16
+ ### ๐Ÿ“š Documentation Generation
17
+ - Generate from code annotations
18
+ - Create OpenAPI/Swagger specs
19
+ - Generate Markdown docs
20
+ - Create client SDKs
21
+
22
+ ### ๐Ÿ”„ Synchronization
23
+ - Sync to API platforms
24
+ - Update documentation
25
+ - Version management
26
+ - Change tracking
27
+
28
+ ### โœ… Validation
29
+ - Schema validation
30
+ - Breaking change detection
31
+ - Backward compatibility
32
+ - Style guide compliance
33
+
34
+ ## Trigger Patterns
35
+
36
+ ```
37
+ "APIๆ–‡ๆกฃ", "API documentation", "API docs"
38
+ "ๆŽฅๅฃๅŒๆญฅ", "sync API", "ๆŽฅๅฃๆ–‡ๆกฃ"
39
+ "Swagger", "OpenAPI"
40
+ "API็ฎก็†", "API management"
41
+ ```
42
+
43
+ ## Output Format
44
+
45
+ ```
46
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
47
+ โ”‚ API Sync Report โ”‚
48
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
49
+ โ”‚ Platform: {platform} โ”‚
50
+ โ”‚ Project: {project} โ”‚
51
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
52
+ โ”‚ Endpoints: {count} โ”‚
53
+ โ”‚ โ€ข Added: {added} โ”‚
54
+ โ”‚ โ€ข Updated: {updated} โ”‚
55
+ โ”‚ โ€ข Deleted: {deleted} โ”‚
56
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
57
+ โ”‚ Status: โœ“ Synced Successfully โ”‚
58
+ โ”‚ URL: {docs_url} โ”‚
59
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
60
+ ```
61
+
62
+ ## Supported Platforms
63
+
64
+ | Platform | Status | Features |
65
+ |----------|--------|----------|
66
+ | YApi | โœ… | Full support |
67
+ | Swagger Hub | โœ… | Full support |
68
+ | Postman | โœ… | Collections |
69
+ | Stoplight | ๐Ÿšง | Coming soon |
70
+ | ReadMe | ๐Ÿšง | Coming soon |
71
+
72
+ ## Learning Integration
73
+
74
+ This skill supports FlowMind learning:
75
+
76
+ - **Platform**: Learns preferred API platform
77
+ - **Format**: Learns preferred doc format
78
+ - **Sync Rules**: Learns what to sync
79
+
80
+ ```
81
+ User: "ๅŒๆญฅๅˆฐ YApi"
82
+ FlowMind: โœ“ Learned: Sync APIs to YApi
83
+
84
+ User: [Next sync]
85
+ FlowMind: [Syncs to YApi automatically]
86
+ ```
87
+
88
+ ## Examples
89
+
90
+ ### Example 1: Generate API Docs
91
+
92
+ ```
93
+ User: ็”Ÿๆˆ่ฟ™ไธช Controller ็š„ API ๆ–‡ๆกฃ
94
+
95
+ FlowMind:
96
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
97
+ โ”‚ API Documentation Generated โ”‚
98
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
99
+ โ”‚ Source: src/controllers/UserController.java โ”‚
100
+ โ”‚ Endpoints: 5 โ”‚
101
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
102
+ โ”‚ GET /api/users - List users โ”‚
103
+ โ”‚ GET /api/users/{id} - Get user โ”‚
104
+ โ”‚ POST /api/users - Create user โ”‚
105
+ โ”‚ PUT /api/users/{id} - Update user โ”‚
106
+ โ”‚ DELETE /api/users/{id} - Delete user โ”‚
107
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
108
+ โ”‚ Output: docs/api/users.md โ”‚
109
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
110
+ ```
111
+
112
+ ### Example 2: Sync to Platform
113
+
114
+ ```
115
+ User: ๅŒๆญฅๆŽฅๅฃๅˆฐ YApi
116
+
117
+ FlowMind:
118
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
119
+ โ”‚ API Sync Complete โ”‚
120
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
121
+ โ”‚ Platform: YApi โ”‚
122
+ โ”‚ Project: My Project โ”‚
123
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
124
+ โ”‚ Synced: โ”‚
125
+ โ”‚ โ€ข Added: 2 endpoints โ”‚
126
+ โ”‚ โ€ข Updated: 3 endpoints โ”‚
127
+ โ”‚ โ€ข Unchanged: 10 endpoints โ”‚
128
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
129
+ โ”‚ View at: http://yapi.example.com/project/123 โ”‚
130
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
131
+ ```
132
+
133
+ ## Configuration
134
+
135
+ ```json
136
+ {
137
+ "api-sync": {
138
+ "platform": "yapi",
139
+ "connection": {
140
+ "host": "http://yapi.example.com",
141
+ "projectId": "123",
142
+ "token": "your-token"
143
+ },
144
+ "options": {
145
+ "autoSync": true,
146
+ "generateDocs": true,
147
+ "validateSchema": true
148
+ }
149
+ }
150
+ }
151
+ ```
152
+
153
+ ## Sync Modes
154
+
155
+ ### Full Sync
156
+
157
+ ```bash
158
+ flowmind api-sync --full
159
+ ```
160
+
161
+ Syncs all endpoints, overwriting remote changes.
162
+
163
+ ### Incremental Sync
164
+
165
+ ```bash
166
+ flowmind api-sync --incremental
167
+ ```
168
+
169
+ Only syncs changed endpoints.
170
+
171
+ ### Dry Run
172
+
173
+ ```bash
174
+ flowmind api-sync --dry-run
175
+ ```
176
+
177
+ Shows what would be synced without making changes.
178
+
179
+ ## Custom Templates
180
+
181
+ ### Markdown Template
182
+
183
+ ```json
184
+ {
185
+ "api-sync": {
186
+ "templates": {
187
+ "markdown": "templates/api-doc.md"
188
+ }
189
+ }
190
+ }
191
+ ```
192
+
193
+ ### OpenAPI Template
194
+
195
+ ```json
196
+ {
197
+ "api-sync": {
198
+ "templates": {
199
+ "openapi": "templates/openapi.yaml"
200
+ }
201
+ }
202
+ }
203
+ ```
@@ -0,0 +1,172 @@
1
+ ---
2
+ name: archive-change
3
+ description: Archive completed changes and maintain project history. Use when a feature, fix, or change is complete and needs to be documented and archived.
4
+ metadata:
5
+ version: "1.0.0"
6
+ author: flowmind
7
+ category: workflow
8
+ ---
9
+
10
+ # Archive Change Skill
11
+
12
+ Archive completed changes and maintain project history.
13
+
14
+ ## Features
15
+
16
+ ### ๐Ÿ“ฆ Change Archiving
17
+ - Move completed changes to archive
18
+ - Generate completion reports
19
+ - Update project history
20
+ - Clean up working directories
21
+
22
+ ### ๐Ÿ“ Documentation
23
+ - Auto-generate change summary
24
+ - Link related artifacts
25
+ - Update changelog
26
+ - Create knowledge base entries
27
+
28
+ ### ๐Ÿ”— Cross-Reference
29
+ - Link to related issues
30
+ - Reference PRs and commits
31
+ - Connect to requirements
32
+ - Trace to deployments
33
+
34
+ ## Trigger Patterns
35
+
36
+ ```
37
+ "ๅฝ’ๆกฃ", "archive", "ๅฎŒๆˆ"
38
+ "ๅ˜ๆ›ดๅฎŒๆˆ", "change complete"
39
+ "็ป“ๆŸๅ˜ๆ›ด", "finish change"
40
+ "ไบคไป˜", "deliver"
41
+ ```
42
+
43
+ ## Output Format
44
+
45
+ ```
46
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
47
+ โ”‚ Change Archived โ”‚
48
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
49
+ โ”‚ Change: {change_name} โ”‚
50
+ โ”‚ Status: โœ“ Completed โ”‚
51
+ โ”‚ Duration: {days} days โ”‚
52
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
53
+ โ”‚ Artifacts: โ”‚
54
+ โ”‚ โ€ข Proposal: โœ“ โ”‚
55
+ โ”‚ โ€ข Specs: โœ“ โ”‚
56
+ โ”‚ โ€ข Design: โœ“ โ”‚
57
+ โ”‚ โ€ข Tasks: โœ“ (15/15 completed) โ”‚
58
+ โ”‚ โ€ข Tests: โœ“ (42 passed) โ”‚
59
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
60
+ โ”‚ Archive Location: โ”‚
61
+ โ”‚ archive/changes/{change_name}/ โ”‚
62
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
63
+ ```
64
+
65
+ ## Archive Structure
66
+
67
+ ```
68
+ archive/
69
+ โ””โ”€โ”€ changes/
70
+ โ””โ”€โ”€ {change_name}/
71
+ โ”œโ”€โ”€ SUMMARY.md # Change summary
72
+ โ”œโ”€โ”€ PROPOSAL.md # Original proposal
73
+ โ”œโ”€โ”€ SPECS.md # Specifications
74
+ โ”œโ”€โ”€ DESIGN.md # Design document
75
+ โ”œโ”€โ”€ TASKS.md # Task list
76
+ โ”œโ”€โ”€ CHANGELOG.md # Detailed changes
77
+ โ”œโ”€โ”€ TESTS.md # Test results
78
+ โ””โ”€โ”€ artifacts/ # Related files
79
+ ```
80
+
81
+ ## Learning Integration
82
+
83
+ This skill supports FlowMind learning:
84
+
85
+ - **Archive Format**: Learns preferred archive structure
86
+ - **Summary Style**: Learns how to summarize changes
87
+ - **Cleanup Rules**: Learns what to keep/delete
88
+
89
+ ```
90
+ User: "ๅฝ’ๆกฃๆ—ถไฟ็•™ๆต‹่ฏ•ๆŠฅๅ‘Š"
91
+ FlowMind: โœ“ Learned: Keep test reports in archive
92
+
93
+ User: [Next archive]
94
+ FlowMind: [Includes test reports automatically]
95
+ ```
96
+
97
+ ## Examples
98
+
99
+ ### Example 1: Archive Feature
100
+
101
+ ```
102
+ User: ๅฝ’ๆกฃ็”จๆˆท็™ปๅฝ•ๅŠŸ่ƒฝ
103
+
104
+ FlowMind:
105
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
106
+ โ”‚ Change Archived โ”‚
107
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
108
+ โ”‚ Change: user-login-feature โ”‚
109
+ โ”‚ Status: โœ“ Completed โ”‚
110
+ โ”‚ Duration: 14 days โ”‚
111
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
112
+ โ”‚ Summary: โ”‚
113
+ โ”‚ โ€ข Implemented OAuth2 login โ”‚
114
+ โ”‚ โ€ข Added social login (Google, GitHub) โ”‚
115
+ โ”‚ โ€ข Created user session management โ”‚
116
+ โ”‚ โ€ข Added login rate limiting โ”‚
117
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
118
+ โ”‚ Metrics: โ”‚
119
+ โ”‚ โ€ข 23 files changed โ”‚
120
+ โ”‚ โ€ข 1,847 lines added โ”‚
121
+ โ”‚ โ€ข 42 test cases โ”‚
122
+ โ”‚ โ€ข 100% test coverage โ”‚
123
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
124
+ โ”‚ Archive: archive/changes/user-login-feature/ โ”‚
125
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
126
+ ```
127
+
128
+ ### Example 2: Bulk Archive
129
+
130
+ ```
131
+ User: ๅฝ’ๆกฃๆ‰€ๆœ‰ๅทฒๅฎŒๆˆ็š„ๅ˜ๆ›ด
132
+
133
+ FlowMind:
134
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
135
+ โ”‚ Bulk Archive Complete โ”‚
136
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
137
+ โ”‚ Archived: 3 changes โ”‚
138
+ โ”‚ โ€ข user-login-feature (14 days) โ”‚
139
+ โ”‚ โ€ข order-optimization (7 days) โ”‚
140
+ โ”‚ โ€ข api-refactor (21 days) โ”‚
141
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
142
+ โ”‚ Total: โ”‚
143
+ โ”‚ โ€ข 67 files archived โ”‚
144
+ โ”‚ โ€ข 12,456 lines documented โ”‚
145
+ โ”‚ โ€ข 156 test cases โ”‚
146
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
147
+ ```
148
+
149
+ ## Configuration
150
+
151
+ ```json
152
+ {
153
+ "archive-change": {
154
+ "location": "archive/changes",
155
+ "keepTests": true,
156
+ "keepArtifacts": true,
157
+ "generateSummary": true,
158
+ "updateChangelog": true
159
+ }
160
+ }
161
+ ```
162
+
163
+ ## Archive Checklist
164
+
165
+ Before archiving, FlowMind checks:
166
+
167
+ - [ ] All tasks completed
168
+ - [ ] All tests passing
169
+ - [ ] Documentation updated
170
+ - [ ] Code reviewed
171
+ - [ ] No open issues
172
+ - [ ] Deployment verified