@claude-flow/cli 3.0.0-alpha.122 β†’ 3.0.0-alpha.124

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.
@@ -1,7 +1,15 @@
1
1
  # Neural Pattern Training
2
2
 
3
3
  ## Purpose
4
- Continuously improve coordination through neural network learning.
4
+ Continuously improve coordination through neural network learning with SONA (Self-Optimizing Neural Architecture).
5
+
6
+ ## Pattern Persistence
7
+
8
+ Patterns are **automatically persisted** to disk:
9
+ - **Patterns**: `.claude-flow/neural/patterns.json`
10
+ - **Stats**: `.claude-flow/neural/stats.json`
11
+
12
+ Patterns survive process restarts and are loaded automatically on next session.
5
13
 
6
14
  ## How Training Works
7
15
 
@@ -13,17 +21,24 @@ Every successful operation trains the neural networks:
13
21
  - Agent coordination patterns
14
22
 
15
23
  ### 2. Manual Training
16
- ```
17
- Tool: mcp__claude-flow__neural_train
18
- Parameters: {
19
- "pattern_type": "coordination",
20
- "training_data": "successful task patterns",
21
- "epochs": 50
22
- }
24
+ ```bash
25
+ # Train coordination patterns (50 epochs)
26
+ npx claude-flow neural train -p coordination -e 50
27
+
28
+ # Train optimization patterns with custom learning rate
29
+ npx claude-flow neural train -p optimization -l 0.005
30
+
31
+ # Quick training (10 epochs)
32
+ npx claude-flow neural train -e 10
23
33
  ```
24
34
 
25
35
  ### 3. Pattern Types
26
36
 
37
+ **Training Pattern Types:**
38
+ - `coordination` - Task coordination strategies (default)
39
+ - `optimization` - Performance optimization patterns
40
+ - `prediction` - Predictive preloading patterns
41
+
27
42
  **Cognitive Patterns:**
28
43
  - Convergent: Focused problem-solving
29
44
  - Divergent: Creative exploration
@@ -33,42 +48,61 @@ Parameters: {
33
48
  - Abstract: High-level design
34
49
 
35
50
  ### 4. Improvement Tracking
36
- ```
37
- Tool: mcp__claude-flow__neural_status
38
- Result: {
39
- "patterns": {
40
- "convergent": 0.92,
41
- "divergent": 0.87,
42
- "lateral": 0.85
43
- },
44
- "improvement": "5.3% since last session",
45
- "confidence": 0.89
46
- }
51
+ ```bash
52
+ # Check neural system status
53
+ npx claude-flow neural status
47
54
  ```
48
55
 
49
- ## Pattern Analysis
50
- ```
51
- Tool: mcp__claude-flow__neural_patterns
52
- Parameters: {
53
- "action": "analyze",
54
- "operation": "recent_edits"
55
- }
56
+ ## Pattern Management
57
+
58
+ ```bash
59
+ # List all persisted patterns
60
+ npx claude-flow neural patterns --action list
61
+
62
+ # Search patterns by query
63
+ npx claude-flow neural patterns --action list -q "error handling"
64
+
65
+ # Analyze patterns
66
+ npx claude-flow neural patterns --action analyze -q "coordination"
56
67
  ```
57
68
 
69
+ ## Performance Targets
70
+
71
+ | Metric | Target |
72
+ |--------|--------|
73
+ | SONA Adaptation | <0.05ms (achieved: ~2ΞΌs) |
74
+ | Pattern Search | O(log n) with HNSW |
75
+ | Memory Efficient | Circular buffers |
76
+
58
77
  ## Benefits
59
78
  - 🧠 Learns your coding style
60
79
  - πŸ“ˆ Improves with each use
61
80
  - 🎯 Better task predictions
62
81
  - ⚑ Faster coordination
82
+ - πŸ’Ύ Patterns persist across sessions
83
+
84
+ ## CLI Reference
63
85
 
64
- ## CLI Usage
65
86
  ```bash
66
- # Train neural patterns via CLI
67
- npx claude-flow neural train --type coordination --epochs 50
87
+ # Train neural patterns
88
+ npx claude-flow neural train -p coordination -e 50
68
89
 
69
90
  # Check neural status
70
91
  npx claude-flow neural status
71
92
 
93
+ # List patterns
94
+ npx claude-flow neural patterns --action list
95
+
96
+ # Search patterns
97
+ npx claude-flow neural patterns --action list -q "query"
98
+
72
99
  # Analyze patterns
73
- npx claude-flow neural patterns --analyze
74
- ```
100
+ npx claude-flow neural patterns --action analyze -q "coordination"
101
+ ```
102
+
103
+ ## Related Commands
104
+
105
+ - `neural train` - Train patterns with SONA
106
+ - `neural status` - Check neural system status
107
+ - `neural patterns` - List and search patterns
108
+ - `neural predict` - Make predictions using trained models
@@ -1,25 +1,75 @@
1
1
  # neural-train
2
2
 
3
- Train neural patterns from operations.
3
+ Train neural patterns with SONA (Self-Optimizing Neural Architecture) for adaptive learning and pattern recognition.
4
4
 
5
5
  ## Usage
6
6
  ```bash
7
- npx claude-flow training neural-train [options]
7
+ npx claude-flow neural train [options]
8
8
  ```
9
9
 
10
10
  ## Options
11
- - `--data <source>` - Training data source
12
- - `--model <name>` - Target model
13
- - `--epochs <n>` - Training epochs
11
+ - `-p, --pattern <type>` - Pattern type: coordination, optimization, prediction (default: coordination)
12
+ - `-e, --epochs <n>` - Number of training epochs (default: 50)
13
+ - `-d, --data <file>` - Training data file (JSON)
14
+ - `-m, --model <id>` - Model ID to train
15
+ - `-l, --learning-rate <rate>` - Learning rate (default: 0.001)
16
+ - `-b, --batch-size <n>` - Batch size (default: 32)
17
+
18
+ ## Pattern Persistence
19
+
20
+ Trained patterns are **automatically persisted** to disk:
21
+ - **Location**: `.claude-flow/neural/patterns.json`
22
+ - **Stats**: `.claude-flow/neural/stats.json`
23
+
24
+ Patterns survive process restarts and are loaded automatically on next session.
14
25
 
15
26
  ## Examples
27
+
16
28
  ```bash
17
- # Train from recent ops
18
- npx claude-flow training neural-train --data recent
29
+ # Train coordination patterns (50 epochs)
30
+ npx claude-flow neural train -p coordination -e 50
31
+
32
+ # Train with custom learning rate
33
+ npx claude-flow neural train -p optimization -l 0.005
19
34
 
20
- # Specific model
21
- npx claude-flow training neural-train --model task-predictor
35
+ # Train from file
36
+ npx claude-flow neural train -d ./training-data.json
22
37
 
23
- # Custom epochs
24
- npx claude-flow training neural-train --epochs 100
38
+ # Quick training (10 epochs)
39
+ npx claude-flow neural train -e 10
25
40
  ```
41
+
42
+ ## Output
43
+
44
+ Training produces:
45
+ - **Patterns Recorded**: Number of patterns stored in ReasoningBank
46
+ - **Trajectories**: Complete learning sequences recorded
47
+ - **SONA Adaptation**: Target is <0.05ms per operation
48
+ - **Persistence Path**: Where patterns are saved
49
+
50
+ ## List Trained Patterns
51
+
52
+ ```bash
53
+ # List all persisted patterns
54
+ npx claude-flow neural patterns --action list
55
+
56
+ # Search patterns by query
57
+ npx claude-flow neural patterns --action list -q "error handling"
58
+
59
+ # Analyze patterns
60
+ npx claude-flow neural patterns --action analyze -q "coordination"
61
+ ```
62
+
63
+ ## Performance Targets
64
+
65
+ | Metric | Target |
66
+ |--------|--------|
67
+ | SONA Adaptation | <0.05ms (achieved: ~2ΞΌs) |
68
+ | Pattern Search | O(log n) with HNSW |
69
+ | Memory Efficient | Circular buffers |
70
+
71
+ ## Related Commands
72
+
73
+ - `neural patterns` - List and search patterns
74
+ - `neural status` - Check neural system status
75
+ - `neural predict` - Make predictions using trained models
package/README.md CHANGED
@@ -3786,33 +3786,67 @@ docker run -d -p 5432:5432 ruvnet/ruvector-postgres
3786
3786
  | **[@ruvector/graph-node](https://www.npmjs.com/package/@ruvector/graph-node)** | Graph DB with Cypher queries | 10x faster than WASM |
3787
3787
  | **[@ruvector/rvlite](https://www.npmjs.com/package/@ruvector/rvlite)** | Standalone DB (SQL, SPARQL, Cypher) | All-in-one solution |
3788
3788
 
3789
- ### 🐘 RuVector Postgres β€” Centralized Learning & Coordination
3789
+ ### 🐘 RuVector PostgreSQL β€” Enterprise Vector Database
3790
3790
 
3791
- For production swarms requiring centralized state and coordination:
3791
+ **77+ SQL functions** for AI operations directly in PostgreSQL with ~61Β΅s search latency and 16,400 QPS.
3792
3792
 
3793
3793
  ```bash
3794
- # Pull and run RuVector Postgres
3794
+ # Quick setup with CLI (recommended)
3795
+ npx claude-flow ruvector setup --output ./my-ruvector
3796
+ cd my-ruvector && docker-compose up -d
3797
+
3798
+ # Or pull directly from Docker Hub
3795
3799
  docker run -d \
3796
3800
  --name ruvector-postgres \
3797
3801
  -p 5432:5432 \
3798
- -e POSTGRES_PASSWORD=ruvector \
3799
- -v ruvector-data:/var/lib/postgresql/data \
3802
+ -e POSTGRES_USER=claude \
3803
+ -e POSTGRES_PASSWORD=claude-flow-test \
3804
+ -e POSTGRES_DB=claude_flow \
3800
3805
  ruvnet/ruvector-postgres
3801
3806
 
3802
- # Configure Claude-Flow to use centralized backend
3803
- npx claude-flow@v3alpha config set memory.backend postgres
3804
- npx claude-flow@v3alpha config set memory.postgresUrl "postgresql://postgres:ruvector@localhost:5432/ruvector"
3807
+ # Migrate existing memory to PostgreSQL
3808
+ npx claude-flow ruvector import --input memory-export.json
3809
+ ```
3810
+
3811
+ **RuVector PostgreSQL vs pgvector:**
3812
+
3813
+ | Feature | pgvector | RuVector PostgreSQL |
3814
+ |---------|----------|---------------------|
3815
+ | **SQL Functions** | ~10 basic | **77+ comprehensive** |
3816
+ | **Search Latency** | ~1ms | **~61Β΅s** |
3817
+ | **Throughput** | ~5K QPS | **16,400 QPS** |
3818
+ | **Attention Mechanisms** | ❌ None | **βœ… 39 types (self, multi-head, cross)** |
3819
+ | **GNN Operations** | ❌ None | **βœ… GAT, message passing** |
3820
+ | **Hyperbolic Embeddings** | ❌ None | **βœ… PoincarΓ©/Lorentz space** |
3821
+ | **Hybrid Search** | ❌ Manual | **βœ… BM25/TF-IDF built-in** |
3822
+ | **Local Embeddings** | ❌ None | **βœ… 6 fastembed models** |
3823
+ | **Self-Learning** | ❌ None | **βœ… GNN-based optimization** |
3824
+ | **SIMD Optimization** | Basic | **AVX-512/AVX2/NEON (~2x faster)** |
3825
+
3826
+ **Key SQL Functions:**
3827
+
3828
+ ```sql
3829
+ -- Vector operations with HNSW indexing
3830
+ SELECT * FROM embeddings ORDER BY embedding <=> query_vec LIMIT 10;
3831
+
3832
+ -- Hyperbolic embeddings for hierarchical data
3833
+ SELECT ruvector_poincare_distance(a, b, -1.0) AS distance;
3834
+ SELECT ruvector_mobius_add(a, b, -1.0) AS result;
3835
+
3836
+ -- Cosine similarity
3837
+ SELECT cosine_similarity_arr(a, b) AS similarity;
3805
3838
  ```
3806
3839
 
3807
- **Benefits of Centralized Postgres:**
3840
+ **Benefits over Local SQLite:**
3808
3841
 
3809
- | Feature | Local SQLite | RuVector Postgres |
3810
- |---------|--------------|-------------------|
3842
+ | Feature | Local SQLite | RuVector PostgreSQL |
3843
+ |---------|--------------|---------------------|
3811
3844
  | **Multi-Agent Coordination** | Single machine | Distributed across hosts |
3812
3845
  | **Pattern Sharing** | File-based | Real-time synchronized |
3813
3846
  | **Learning Persistence** | Local only | Centralized, backed up |
3814
3847
  | **Swarm Scale** | 15 agents | 100+ agents |
3815
- | **Query Language** | Basic KV | Full SQL + pgvector |
3848
+ | **Query Language** | Basic KV | Full SQL + 77 functions |
3849
+ | **AI Operations** | External only | **In-database (attention, GNN)** |
3816
3850
 
3817
3851
  <details>
3818
3852
  <summary>⚑ <strong>@ruvector/attention</strong> β€” Flash Attention (2.49x-7.47x Speedup)</summary>
@@ -3950,17 +3984,33 @@ const similarity = attention.attention(queries, keys, values);
3950
3984
  ### CLI Commands
3951
3985
 
3952
3986
  ```bash
3953
- # Check ruvector installation
3954
- npx ruvector status
3955
-
3956
- # Benchmark HNSW performance
3987
+ # RuVector PostgreSQL Setup (generates Docker files + SQL)
3988
+ npx claude-flow ruvector setup # Output to ./ruvector-postgres
3989
+ npx claude-flow ruvector setup --output ./mydir # Custom directory
3990
+ npx claude-flow ruvector setup --print # Preview files
3991
+
3992
+ # Import from sql.js/JSON to PostgreSQL
3993
+ npx claude-flow ruvector import --input data.json # Direct import
3994
+ npx claude-flow ruvector import --input data.json --output sql # Dry-run (generate SQL)
3995
+
3996
+ # Other RuVector commands
3997
+ npx claude-flow ruvector status --verbose # Check connection
3998
+ npx claude-flow ruvector benchmark --vectors 10000 # Performance test
3999
+ npx claude-flow ruvector optimize --analyze # Optimization suggestions
4000
+ npx claude-flow ruvector backup --output backup.sql # Backup data
4001
+
4002
+ # Native ruvector CLI
4003
+ npx ruvector status # Check installation
3957
4004
  npx ruvector benchmark --vectors 10000 --dimensions 384
4005
+ ```
3958
4006
 
3959
- # Initialize Postgres backend
3960
- npx ruvector postgres init --url postgresql://localhost:5432/ruvector
3961
-
3962
- # Migrate patterns to centralized storage
3963
- npx ruvector postgres migrate --from ./data/patterns
4007
+ **Generated Setup Files:**
4008
+ ```
4009
+ ruvector-postgres/
4010
+ β”œβ”€β”€ docker-compose.yml # Docker services (PostgreSQL + pgAdmin)
4011
+ β”œβ”€β”€ README.md # Quick start guide
4012
+ └── scripts/
4013
+ └── init-db.sql # Database initialization (tables, indexes, functions)
3964
4014
  ```
3965
4015
 
3966
4016
  </details>
@@ -1,6 +1,9 @@
1
1
  /**
2
2
  * V3 CLI Hive Mind Command
3
3
  * Queen-led consensus-based multi-agent coordination
4
+ *
5
+ * Updated to support --claude flag for launching interactive Claude Code sessions
6
+ * PR: Fix #955 - Implement --claude flag for hive-mind spawn command
4
7
  */
5
8
  import type { Command } from '../types.js';
6
9
  export declare const hiveMindCommand: Command;
@@ -1 +1 @@
1
- {"version":3,"file":"hive-mind.d.ts","sourceRoot":"","sources":["../../../src/commands/hive-mind.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAiC,MAAM,aAAa,CAAC;AA4zB1E,eAAO,MAAM,eAAe,EAAE,OA2C7B,CAAC;AAqEF,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"hive-mind.d.ts","sourceRoot":"","sources":["../../../src/commands/hive-mind.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAiC,MAAM,aAAa,CAAC;AA+uC1E,eAAO,MAAM,eAAe,EAAE,OAiD7B,CAAC;AAqEF,eAAe,eAAe,CAAC"}