v2/docs/releases/v2.7.1/RELEASE_v2.7.1.md
Release Date: 2025-10-22 Type: Point Release (Bug Fix) Priority: High GitHub Issue: #827
This point release fixes critical bugs in the MCP (Model Context Protocol) pattern system where neural patterns were not persisting to memory, making pattern storage, search, and statistics completely or partially non-functional.
Status Before: โ ๏ธ Partial - Accepted requests but data not persisting Status After: โ Fully Functional
neural_train now properly persists patterns to the patterns namespacepattern-stats namespaceStatus Before: โ ๏ธ Partial - Handler completely missing Status After: โ Fully Functional
neural_patterns handler with 4 actionsStatus Before: โ ๏ธ Partial - Returned empty results Status After: โ Fully Functional
src/mcp/mcp-server.js
neural_train handler with persistenceneural_patterns handler implementationneural_train Enhancements// Now persists to memory with metadata
await this.memoryStore.store(modelId, JSON.stringify(patternData), {
namespace: 'patterns',
ttl: 30 * 24 * 60 * 60 * 1000,
metadata: { sessionId, pattern_type, accuracy, epochs, ... }
});
// Tracks aggregate statistics
stats.total_trainings += 1;
stats.avg_accuracy = (previous_avg * (n-1) + new_accuracy) / n;
stats.max_accuracy = Math.max(max, new_accuracy);
// ... more tracking
neural_patterns Actions1. Analyze (action: 'analyze')
{ action: 'analyze', metadata: { modelId: '...' } }{ action: 'analyze' }2. Learn (action: 'learn')
{ action: 'learn', operation: '...', outcome: '...' }patterns namespace with type learning_experience3. Predict (action: 'predict')
{ action: 'predict', metadata: { pattern_type: 'coordination' } }4. Stats (action: 'stats')
{ action: 'stats', metadata: { pattern_type: 'optimization' } }{ action: 'stats' }Pattern Data:
{
modelId: string,
pattern_type: 'coordination' | 'optimization' | 'prediction',
epochs: number,
accuracy: number,
training_time: number,
status: 'completed',
improvement_rate: 'converged' | 'improving',
data_source: string,
timestamp: ISO8601,
training_metadata: { baseAccuracy, maxAccuracy, epochFactor, finalAccuracy }
}
Statistics Data:
{
pattern_type: string,
total_trainings: number,
avg_accuracy: number,
max_accuracy: number,
min_accuracy: number,
total_epochs: number,
models: Array<{modelId, accuracy, timestamp}> // Last 50
}
tests/integration/mcp-pattern-persistence.test.jstests/manual/test-pattern-persistence.jsnode tests/manual/test-pattern-persistence.jsdocs/PATTERN_PERSISTENCE_FIX.mdTo verify the fix works:
# 1. Train a neural pattern (will auto-persist)
npx claude-flow hooks neural-train --pattern-type coordination --epochs 50
# 2. Retrieve the pattern
npx claude-flow hooks neural-patterns --action analyze
# 3. Check statistics
npx claude-flow hooks neural-patterns --action stats --pattern-type coordination
# 4. Make a prediction
npx claude-flow hooks neural-patterns --action predict --pattern-type coordination
โ 100% Backward Compatible
neural_train returns same response format as beforeneural_patterns is new functionality (no prior implementation)No migration required - This is a transparent enhancement:
Version: 2.7.1
Tag: v2.7.1
Commit: 7bbf94a5b
Branch: feature/agentic-flow-integration
Installation:
npm install [email protected]
# or
pnpm install [email protected]
From GitHub:
npm install github:ruvnet/claude-code-flow#v2.7.1
docs/PATTERN_PERSISTENCE_FIX.mdtests/integration/mcp-pattern-persistence.test.jstests/manual/test-pattern-persistence.jsCHANGELOG.md v2.7.1 section# Push changes to remote
git push origin feature/agentic-flow-integration
# Push tags
git push origin v2.7.1
# Create GitHub release (using gh CLI)
gh release create v2.7.1 \
--title "v2.7.1: Critical MCP Pattern Persistence Fix" \
--notes-file docs/RELEASE_v2.7.1.md \
--target feature/agentic-flow-integration
# Publish to npm (if authorized)
npm publish
This point release transforms the MCP pattern system from partially functional to fully operational:
Impact: From โ ๏ธ Partial (all operations) โ โ Fully Functional (all operations)
Prepared by: Claude Code Date: 2025-10-22 Status: Ready for Publishing