claude-flow 2.5.0-alpha.141 → 2.7.0-alpha.1
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/.claude/agents/reasoning/README.md +171 -0
- package/.claude/agents/reasoning/agent.md +816 -0
- package/.claude/agents/reasoning/example-reasoning-agent-template.md +362 -0
- package/.claude/agents/reasoning/goal-planner.md +73 -0
- package/.claude/commands/coordination/README.md +9 -0
- package/.claude/commands/memory/README.md +9 -0
- package/.claude/settings.json +3 -3
- package/.claude/sparc-modes.json +108 -0
- package/README.md +1 -6
- package/bin/claude-flow +1 -1
- package/dist/src/cli/command-registry.js +70 -6
- package/dist/src/cli/command-registry.js.map +1 -1
- package/dist/src/cli/help-formatter.js +5 -3
- package/dist/src/cli/help-formatter.js.map +1 -1
- package/dist/src/cli/help-text.js +53 -5
- package/dist/src/cli/help-text.js.map +1 -1
- package/dist/src/cli/simple-cli.js +182 -172
- package/dist/src/cli/simple-cli.js.map +1 -1
- package/dist/src/cli/simple-commands/agent-booster.js +415 -0
- package/dist/src/cli/simple-commands/agent-booster.js.map +1 -0
- package/dist/src/cli/simple-commands/agent.js +856 -13
- package/dist/src/cli/simple-commands/agent.js.map +1 -1
- package/dist/src/cli/simple-commands/config.js +115 -257
- package/dist/src/cli/simple-commands/config.js.map +1 -1
- package/dist/src/cli/simple-commands/env-template.js +180 -0
- package/dist/src/cli/simple-commands/env-template.js.map +1 -0
- package/dist/src/cli/simple-commands/init/help.js +23 -0
- package/dist/src/cli/simple-commands/init/help.js.map +1 -1
- package/dist/src/cli/simple-commands/init/index.js +63 -0
- package/dist/src/cli/simple-commands/init/index.js.map +1 -1
- package/dist/src/cli/simple-commands/memory.js +414 -16
- package/dist/src/cli/simple-commands/memory.js.map +1 -1
- package/dist/src/cli/simple-commands/proxy.js +304 -0
- package/dist/src/cli/simple-commands/proxy.js.map +1 -0
- package/dist/src/cli/simple-commands/sparc.js +16 -19
- package/dist/src/cli/simple-commands/sparc.js.map +1 -1
- package/dist/src/cli/validation-helper.js.map +1 -1
- package/dist/src/core/version.js +1 -1
- package/dist/src/execution/agent-executor.js +181 -0
- package/dist/src/execution/agent-executor.js.map +1 -0
- package/dist/src/execution/index.js +12 -0
- package/dist/src/execution/index.js.map +1 -0
- package/dist/src/execution/provider-manager.js +110 -0
- package/dist/src/execution/provider-manager.js.map +1 -0
- package/dist/src/hooks/redaction-hook.js +89 -0
- package/dist/src/hooks/redaction-hook.js.map +1 -0
- package/dist/src/memory/swarm-memory.js +340 -421
- package/dist/src/memory/swarm-memory.js.map +1 -1
- package/dist/src/reasoningbank/reasoningbank-adapter.js +144 -0
- package/dist/src/reasoningbank/reasoningbank-adapter.js.map +1 -0
- package/dist/src/utils/key-redactor.js +108 -0
- package/dist/src/utils/key-redactor.js.map +1 -0
- package/dist/src/utils/metrics-reader.js.map +1 -1
- package/docs/AGENT-BOOSTER-INTEGRATION.md +407 -0
- package/docs/AGENTIC-FLOW-INTEGRATION-GUIDE.md +753 -0
- package/docs/AGENTIC_FLOW_EXECUTION_FIX_REPORT.md +474 -0
- package/docs/AGENTIC_FLOW_INTEGRATION_STATUS.md +143 -0
- package/docs/AGENTIC_FLOW_MVP_COMPLETE.md +367 -0
- package/docs/AGENTIC_FLOW_SECURITY_TEST_REPORT.md +369 -0
- package/docs/COMMAND-VERIFICATION-REPORT.md +441 -0
- package/docs/COMMIT_SUMMARY.md +247 -0
- package/docs/DEEP_REVIEW_COMPREHENSIVE_REPORT.md +922 -0
- package/docs/DOCKER-VALIDATION-REPORT.md +281 -0
- package/docs/ENV-SETUP-GUIDE.md +270 -0
- package/docs/FINAL_PRE_PUBLISH_VALIDATION.md +823 -0
- package/docs/FINAL_VALIDATION_REPORT.md +165 -0
- package/docs/HOOKS-V2-MODIFICATION.md +146 -0
- package/docs/INDEX.md +568 -0
- package/docs/INTEGRATION_COMPLETE.md +414 -0
- package/docs/MEMORY_REDACTION_TEST_REPORT.md +300 -0
- package/docs/PERFORMANCE-SYSTEMS-STATUS.md +340 -0
- package/docs/PRE_RELEASE_FIXES_REPORT.md +435 -0
- package/docs/README.md +35 -0
- package/docs/REASONING-AGENTS.md +482 -0
- package/docs/REASONINGBANK-AGENT-CREATION-GUIDE.md +813 -0
- package/docs/REASONINGBANK-ANALYSIS-COMPLETE.md +479 -0
- package/docs/REASONINGBANK-BENCHMARK-RESULTS.md +166 -0
- package/docs/REASONINGBANK-BENCHMARK.md +396 -0
- package/docs/REASONINGBANK-CLI-INTEGRATION.md +455 -0
- package/docs/REASONINGBANK-CORE-INTEGRATION.md +658 -0
- package/docs/REASONINGBANK-COST-OPTIMIZATION.md +329 -0
- package/docs/REASONINGBANK-DEMO.md +419 -0
- package/docs/REASONINGBANK-INTEGRATION-COMPLETE.md +249 -0
- package/docs/REASONINGBANK-INTEGRATION-STATUS.md +179 -0
- package/docs/REASONINGBANK-VALIDATION.md +532 -0
- package/docs/REASONINGBANK_ARCHITECTURE.md +475 -0
- package/docs/REASONINGBANK_INTEGRATION_COMPLETE.md +558 -0
- package/docs/REASONINGBANK_INTEGRATION_PLAN.md +1188 -0
- package/docs/REGRESSION-ANALYSIS-REPORT.md +500 -0
- package/docs/RELEASE_v2.6.0-alpha.2.md +658 -0
- package/docs/api/API_DOCUMENTATION.md +721 -0
- package/docs/architecture/ARCHITECTURE.md +1690 -0
- package/docs/ci-cd/README.md +368 -0
- package/docs/development/DEPLOYMENT.md +2348 -0
- package/docs/development/DEVELOPMENT_WORKFLOW.md +1333 -0
- package/docs/development/build-analysis-report.md +252 -0
- package/docs/development/pair-optimization.md +156 -0
- package/docs/development/token-tracking-status.md +103 -0
- package/docs/development/training-pipeline-demo.md +163 -0
- package/docs/development/training-pipeline-real-only.md +196 -0
- package/docs/epic-sdk-integration.md +1269 -0
- package/docs/experimental/RIEMANN_HYPOTHESIS_PROOF.md +124 -0
- package/docs/experimental/computational_verification.py +436 -0
- package/docs/experimental/novel_approaches.md +560 -0
- package/docs/experimental/riemann_hypothesis_analysis.md +263 -0
- package/docs/experimental/riemann_proof_attempt.md +124 -0
- package/docs/experimental/riemann_synthesis.md +277 -0
- package/docs/experimental/verification_results.json +12 -0
- package/docs/experimental/visualization_insights.md +720 -0
- package/docs/guides/USER_GUIDE.md +1138 -0
- package/docs/guides/token-tracking-guide.md +291 -0
- package/docs/reference/AGENTS.md +1011 -0
- package/docs/reference/MCP_TOOLS.md +2188 -0
- package/docs/reference/SPARC.md +717 -0
- package/docs/reference/SWARM.md +2000 -0
- package/docs/sdk/CLAUDE-CODE-SDK-DEEP-ANALYSIS.md +649 -0
- package/docs/sdk/CLAUDE-FLOW-SDK-INTEGRATION-ANALYSIS.md +242 -0
- package/docs/sdk/INTEGRATION-ROADMAP.md +420 -0
- package/docs/sdk/MCP-TOOLS-UPDATE.md +270 -0
- package/docs/sdk/SDK-ADVANCED-FEATURES-INTEGRATION.md +723 -0
- package/docs/sdk/SDK-ALL-FEATURES-INTEGRATION-MATRIX.md +612 -0
- package/docs/sdk/SDK-INTEGRATION-COMPLETE.md +358 -0
- package/docs/sdk/SDK-INTEGRATION-PHASES-V2.5.md +750 -0
- package/docs/sdk/SDK-LEVERAGE-REAL-FEATURES.md +676 -0
- package/docs/sdk/SDK-VALIDATION-RESULTS.md +400 -0
- package/docs/sdk/epic-sdk-integration.md +1269 -0
- package/docs/setup/remote-setup.md +93 -0
- package/docs/validation/final-validation-summary.md +220 -0
- package/docs/validation/verification-integration.md +190 -0
- package/docs/validation/verification-validation.md +349 -0
- package/docs/wiki/background-commands.md +1213 -0
- package/docs/wiki/session-persistence.md +342 -0
- package/docs/wiki/stream-chain-command.md +537 -0
- package/package.json +4 -2
- package/src/cli/command-registry.js +70 -5
- package/src/cli/help-text.js +26 -5
- package/src/cli/simple-cli.ts +18 -7
- package/src/cli/simple-commands/agent-booster.js +515 -0
- package/src/cli/simple-commands/agent.js +1001 -12
- package/src/cli/simple-commands/agent.ts +137 -0
- package/src/cli/simple-commands/config.ts +127 -0
- package/src/cli/simple-commands/env-template.js +190 -0
- package/src/cli/simple-commands/init/help.js +23 -0
- package/src/cli/simple-commands/init/index.js +84 -6
- package/src/cli/simple-commands/memory.js +497 -16
- package/src/cli/simple-commands/proxy.js +384 -0
- package/src/cli/simple-commands/sparc.js +16 -19
- package/src/execution/agent-executor.ts +306 -0
- package/src/execution/index.ts +19 -0
- package/src/execution/provider-manager.ts +187 -0
- package/src/hooks/redaction-hook.ts +115 -0
- package/src/reasoningbank/reasoningbank-adapter.js +191 -0
- package/src/utils/key-redactor.js +178 -0
- package/src/utils/key-redactor.ts +184 -0
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
# Training Pipeline - Real Code Execution Only
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
The Claude Flow Training Pipeline now **exclusively uses real code execution**. There is no simulation mode - all training runs actual npm tests on real code files to provide genuine learning and improvement.
|
|
5
|
+
|
|
6
|
+
## What Changed
|
|
7
|
+
|
|
8
|
+
### Before (v1 - Simulation Mode)
|
|
9
|
+
- Used `Math.random()` to simulate test results
|
|
10
|
+
- No actual code execution
|
|
11
|
+
- Artificial scores that didn't reflect reality
|
|
12
|
+
- Learning from random data
|
|
13
|
+
|
|
14
|
+
### Now (v2 - Real Execution Only)
|
|
15
|
+
- Creates actual JavaScript files with real code
|
|
16
|
+
- Runs real `npm install` and `npm test` commands
|
|
17
|
+
- Executes actual Jest tests
|
|
18
|
+
- Learns from genuine test results
|
|
19
|
+
- Shows real improvements in agent performance
|
|
20
|
+
|
|
21
|
+
## How It Works
|
|
22
|
+
|
|
23
|
+
### 1. Task Generation
|
|
24
|
+
The pipeline creates **real code files** in `.claude-flow/training/real-tasks/`:
|
|
25
|
+
|
|
26
|
+
```javascript
|
|
27
|
+
// Example: Email validation function
|
|
28
|
+
function validateEmail(email) {
|
|
29
|
+
const regex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
30
|
+
return regex.test(email);
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### 2. Strategy Testing
|
|
35
|
+
Three strategies modify the code differently:
|
|
36
|
+
- **Conservative**: Adds extra validation (more reliable, slower)
|
|
37
|
+
- **Balanced**: Keeps original code (good balance)
|
|
38
|
+
- **Aggressive**: Reduces validation (faster, riskier)
|
|
39
|
+
|
|
40
|
+
### 3. Real Execution
|
|
41
|
+
Each strategy variant is tested using:
|
|
42
|
+
```bash
|
|
43
|
+
npm install # Install Jest and dependencies
|
|
44
|
+
npm test # Run actual tests
|
|
45
|
+
npm run lint # Check code quality
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### 4. Learning from Results
|
|
49
|
+
The system learns from **actual test results**:
|
|
50
|
+
- Test pass/fail rates
|
|
51
|
+
- Real execution times
|
|
52
|
+
- Actual error messages
|
|
53
|
+
- Performance metrics
|
|
54
|
+
|
|
55
|
+
## Usage
|
|
56
|
+
|
|
57
|
+
### Run Training
|
|
58
|
+
```bash
|
|
59
|
+
# Always runs with real code - no simulation option
|
|
60
|
+
./claude-flow train-pipeline run
|
|
61
|
+
|
|
62
|
+
# Options
|
|
63
|
+
./claude-flow train-pipeline run --complexity hard --iterations 5
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Check Status
|
|
67
|
+
```bash
|
|
68
|
+
./claude-flow train-pipeline status
|
|
69
|
+
|
|
70
|
+
# Output shows real metrics:
|
|
71
|
+
📊 Training Pipeline Status
|
|
72
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
73
|
+
|
|
74
|
+
🤖 Strategy Profiles:
|
|
75
|
+
conservative:
|
|
76
|
+
Success Rate: 40.9% # Real test pass rate
|
|
77
|
+
Average Score: 40.25 # Based on actual results
|
|
78
|
+
Execution Time: 1633ms # Real npm test time
|
|
79
|
+
Real Executions: 4 # Number of real runs
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Validate Performance
|
|
83
|
+
```bash
|
|
84
|
+
./claude-flow train-pipeline validate
|
|
85
|
+
|
|
86
|
+
# Shows current real performance:
|
|
87
|
+
📊 Current Performance:
|
|
88
|
+
Success Rate: 43.1% # Actual success rate
|
|
89
|
+
Avg Execution Time: 1567ms # Real execution time
|
|
90
|
+
Average Score: 41.05 # Based on real tests
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Real Results Example
|
|
94
|
+
|
|
95
|
+
From actual training runs:
|
|
96
|
+
|
|
97
|
+
### Initial State (Iteration 1)
|
|
98
|
+
```
|
|
99
|
+
📊 Learning Results:
|
|
100
|
+
conservative: Score 12.64, Success 0.0%, Time 1839ms
|
|
101
|
+
balanced: Score 12.98, Success 0.0%, Time 1756ms
|
|
102
|
+
aggressive: Score 13.24, Success 0.0%, Time 1691ms
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### After Fixes (Iteration 2)
|
|
106
|
+
```
|
|
107
|
+
📊 Learning Results:
|
|
108
|
+
conservative: Score 42.56, Success 50.0%, Time 1860ms
|
|
109
|
+
balanced: Score 42.57, Success 50.0%, Time 1858ms
|
|
110
|
+
aggressive: Score 43.33, Success 50.0%, Time 1667ms
|
|
111
|
+
|
|
112
|
+
📈 Improvements:
|
|
113
|
+
Success Rate: +14.3%
|
|
114
|
+
Execution Time: -10.8%
|
|
115
|
+
Score: +3.0%
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Task Complexity Levels
|
|
119
|
+
|
|
120
|
+
### Easy
|
|
121
|
+
- Simple functions (email validation, string manipulation)
|
|
122
|
+
- Basic tests with clear pass/fail
|
|
123
|
+
- Quick execution (~2 seconds)
|
|
124
|
+
|
|
125
|
+
### Medium
|
|
126
|
+
- API endpoints with Express
|
|
127
|
+
- Integration tests
|
|
128
|
+
- Moderate execution (~3-4 seconds)
|
|
129
|
+
|
|
130
|
+
### Hard
|
|
131
|
+
- Complex algorithms (sorting, searching)
|
|
132
|
+
- Performance-critical code
|
|
133
|
+
- Comprehensive test suites (~5+ seconds)
|
|
134
|
+
|
|
135
|
+
## Files Created
|
|
136
|
+
|
|
137
|
+
The training pipeline creates real project structures:
|
|
138
|
+
|
|
139
|
+
```
|
|
140
|
+
.claude-flow/training/real-tasks/
|
|
141
|
+
└── task-[timestamp]/
|
|
142
|
+
└── [taskName]/
|
|
143
|
+
├── index.js # Real implementation
|
|
144
|
+
├── index.test.js # Real Jest tests
|
|
145
|
+
└── package.json # Real dependencies
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## Learning Mechanism
|
|
149
|
+
|
|
150
|
+
### Exponential Moving Average
|
|
151
|
+
```javascript
|
|
152
|
+
// Learning rate: 0.4 for real execution (higher than simulation)
|
|
153
|
+
newReliability = oldReliability * 0.6 + newScore * 0.4
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### Real Metrics Tracked
|
|
157
|
+
- **Success Rate**: Actual test pass percentage
|
|
158
|
+
- **Execution Time**: Real npm test duration
|
|
159
|
+
- **Score**: Weighted combination of success and speed
|
|
160
|
+
- **Trend**: Improvement or decline over time
|
|
161
|
+
|
|
162
|
+
## Benefits of Real Execution
|
|
163
|
+
|
|
164
|
+
1. **Genuine Learning**: Agents learn from actual test results
|
|
165
|
+
2. **Real Performance**: Metrics reflect true execution times
|
|
166
|
+
3. **Accurate Predictions**: Future predictions based on real data
|
|
167
|
+
4. **Practical Improvements**: Optimizations that actually work
|
|
168
|
+
5. **No Artificial Bias**: No random numbers affecting results
|
|
169
|
+
|
|
170
|
+
## Migration from Simulation
|
|
171
|
+
|
|
172
|
+
If you have existing profiles from the simulation mode:
|
|
173
|
+
1. The system will continue to use them but update with real data
|
|
174
|
+
2. After a few real executions, the data will be fully based on reality
|
|
175
|
+
3. Old simulation scores will be overwritten by real scores
|
|
176
|
+
|
|
177
|
+
## Troubleshooting
|
|
178
|
+
|
|
179
|
+
### Tests Failing
|
|
180
|
+
- Check that Jest is installed: `npm ls jest`
|
|
181
|
+
- Verify test syntax is correct
|
|
182
|
+
- Ensure proper regex escaping in templates
|
|
183
|
+
|
|
184
|
+
### Slow Execution
|
|
185
|
+
- Normal for first run (npm install)
|
|
186
|
+
- Subsequent runs are faster (cached dependencies)
|
|
187
|
+
- Use `--complexity easy` for quicker iterations
|
|
188
|
+
|
|
189
|
+
### No Improvement
|
|
190
|
+
- Real improvement takes multiple iterations
|
|
191
|
+
- Some randomness in test execution is normal
|
|
192
|
+
- Focus on trends rather than single runs
|
|
193
|
+
|
|
194
|
+
## Summary
|
|
195
|
+
|
|
196
|
+
The Training Pipeline now provides **real machine learning** based on **actual code execution**. No more simulations - every score, every metric, and every improvement is based on real npm test results. This ensures that agent improvements translate directly to better real-world performance.
|