mirror of
https://github.com/SuperClaude-Org/SuperClaude_Framework.git
synced 2025-12-29 16:16:08 +00:00
Revolutionary transformation from hardcoded Python intelligence to hot-reloadable YAML patterns, enabling dynamic configuration without code changes. ## Phase 1: Foundation Intelligence Complete ### YAML Intelligence Patterns (6 files) - intelligence_patterns.yaml: Multi-dimensional pattern recognition with adaptive learning - mcp_orchestration.yaml: Server selection decision trees with load balancing - hook_coordination.yaml: Parallel execution patterns with dependency resolution - performance_intelligence.yaml: Resource zones and auto-optimization triggers - validation_intelligence.yaml: Health scoring and proactive diagnostic patterns - user_experience.yaml: Project detection and smart UX adaptations ### Python Infrastructure Enhanced (4 components) - intelligence_engine.py: Generic YAML pattern interpreter with hot-reload - learning_engine.py: Enhanced with YAML intelligence integration - yaml_loader.py: Added intelligence configuration helper methods - validate_system.py: New YAML-driven validation with health scoring ### Key Features Implemented - Hot-reload intelligence: Update patterns without code changes or restarts - Declarative configuration: All intelligence logic expressed in YAML - Graceful fallbacks: System works correctly even with missing YAML files - Multi-pattern coordination: Intelligent recommendations from multiple sources - Health scoring: Component-weighted validation with predictive diagnostics - Generic architecture: Single engine consumes all intelligence pattern types ### Testing Results ✅ All components integrate correctly ✅ Hot-reload mechanism functional ✅ Graceful error handling verified ✅ YAML-driven validation operational ✅ Health scoring system working (detected real system issues) This enables users to modify intelligence behavior by editing YAML files, add new pattern types without coding, and hot-reload improvements in real-time. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
181 lines
5.3 KiB
YAML
181 lines
5.3 KiB
YAML
# Intelligence Patterns Configuration
|
|
# Core learning intelligence patterns for SuperClaude Framework-Hooks
|
|
# Defines multi-dimensional pattern recognition, adaptive learning, and intelligence behaviors
|
|
|
|
# Metadata
|
|
version: "1.0.0"
|
|
last_updated: "2025-01-06"
|
|
description: "Core intelligence patterns for declarative learning and adaptation"
|
|
|
|
# Learning Intelligence Configuration
|
|
learning_intelligence:
|
|
pattern_recognition:
|
|
# Multi-dimensional pattern analysis
|
|
dimensions:
|
|
primary:
|
|
- context_type # Type of operation context
|
|
- complexity_score # Operation complexity (0.0-1.0)
|
|
- operation_type # Category of operation
|
|
- performance_score # Performance effectiveness (0.0-1.0)
|
|
secondary:
|
|
- file_count # Number of files involved
|
|
- directory_count # Number of directories
|
|
- mcp_server # MCP server involved
|
|
- user_expertise # Detected user skill level
|
|
|
|
# Pattern signature generation
|
|
signature_generation:
|
|
method: "multi_dimensional_hash"
|
|
include_context: true
|
|
fallback_signature: "unknown_pattern"
|
|
max_signature_length: 128
|
|
|
|
# Pattern clustering for similar behavior grouping
|
|
clustering:
|
|
algorithm: "k_means"
|
|
min_cluster_size: 3
|
|
max_clusters: 20
|
|
similarity_threshold: 0.8
|
|
recalculate_interval: 100 # operations
|
|
|
|
adaptive_learning:
|
|
# Dynamic learning rate adjustment
|
|
learning_rate:
|
|
initial: 0.7
|
|
min: 0.1
|
|
max: 1.0
|
|
adaptation_strategy: "confidence_based"
|
|
|
|
# Confidence scoring
|
|
confidence_scoring:
|
|
base_confidence: 0.5
|
|
consistency_weight: 0.4
|
|
frequency_weight: 0.3
|
|
recency_weight: 0.3
|
|
|
|
# Effectiveness thresholds
|
|
effectiveness_thresholds:
|
|
learn_threshold: 0.7 # Minimum effectiveness to create adaptation
|
|
confidence_threshold: 0.6 # Minimum confidence to apply adaptation
|
|
forget_threshold: 0.3 # Below this, remove adaptation
|
|
|
|
pattern_quality:
|
|
# Pattern validation rules
|
|
validation_rules:
|
|
min_usage_count: 3
|
|
max_consecutive_perfect_scores: 10
|
|
effectiveness_variance_limit: 0.5
|
|
required_dimensions: ["context_type", "operation_type"]
|
|
|
|
# Quality scoring
|
|
quality_metrics:
|
|
diversity_score_weight: 0.4
|
|
consistency_score_weight: 0.3
|
|
usage_frequency_weight: 0.3
|
|
|
|
# Pattern Analysis Configuration
|
|
pattern_analysis:
|
|
anomaly_detection:
|
|
# Detect unusual patterns that might indicate issues
|
|
anomaly_patterns:
|
|
- name: "overfitting_detection"
|
|
condition: {consecutive_perfect_scores: ">10"}
|
|
severity: "medium"
|
|
action: "flag_for_review"
|
|
|
|
- name: "pattern_stagnation"
|
|
condition: {no_new_patterns: ">30_days"}
|
|
severity: "low"
|
|
action: "suggest_pattern_diversity"
|
|
|
|
- name: "effectiveness_degradation"
|
|
condition: {effectiveness_trend: "decreasing", duration: ">7_days"}
|
|
severity: "high"
|
|
action: "trigger_pattern_analysis"
|
|
|
|
trend_analysis:
|
|
# Track learning trends over time
|
|
tracking_windows:
|
|
short_term: 24 # hours
|
|
medium_term: 168 # hours (1 week)
|
|
long_term: 720 # hours (30 days)
|
|
|
|
trend_indicators:
|
|
- effectiveness_trend
|
|
- pattern_diversity_trend
|
|
- confidence_trend
|
|
- usage_frequency_trend
|
|
|
|
# Intelligence Enhancement Patterns
|
|
intelligence_enhancement:
|
|
predictive_capabilities:
|
|
# Predictive pattern matching
|
|
prediction_horizon: 5 # operations ahead
|
|
prediction_confidence_threshold: 0.7
|
|
prediction_accuracy_tracking: true
|
|
|
|
context_awareness:
|
|
# Context understanding and correlation
|
|
context_correlation:
|
|
enable_cross_session: true
|
|
enable_project_correlation: true
|
|
enable_user_correlation: true
|
|
correlation_strength_threshold: 0.6
|
|
|
|
adaptive_strategies:
|
|
# Strategy adaptation based on performance
|
|
strategy_adaptation:
|
|
performance_window: 20 # operations
|
|
adaptation_threshold: 0.8
|
|
rollback_threshold: 0.5
|
|
max_adaptations_per_session: 5
|
|
|
|
# Pattern Lifecycle Management
|
|
lifecycle_management:
|
|
pattern_evolution:
|
|
# How patterns evolve over time
|
|
evolution_triggers:
|
|
- usage_count_milestone: [10, 50, 100, 500]
|
|
- effectiveness_improvement: 0.1
|
|
- confidence_improvement: 0.1
|
|
|
|
evolution_actions:
|
|
- promote_to_global
|
|
- increase_weight
|
|
- expand_context
|
|
- merge_similar_patterns
|
|
|
|
pattern_cleanup:
|
|
# Automatic pattern cleanup
|
|
cleanup_triggers:
|
|
max_patterns: 1000
|
|
unused_pattern_age: 30 # days
|
|
low_effectiveness_threshold: 0.3
|
|
|
|
cleanup_strategies:
|
|
- archive_unused
|
|
- merge_similar
|
|
- remove_ineffective
|
|
- compress_historical
|
|
|
|
# Integration Configuration
|
|
integration:
|
|
cache_management:
|
|
# Pattern caching for performance
|
|
cache_patterns: true
|
|
cache_duration: 3600 # seconds
|
|
max_cache_size: 100 # patterns
|
|
cache_invalidation: "smart" # smart, time_based, usage_based
|
|
|
|
performance_optimization:
|
|
# Performance tuning
|
|
lazy_loading: true
|
|
batch_processing: true
|
|
background_analysis: true
|
|
max_processing_time_ms: 100
|
|
|
|
compatibility:
|
|
# Backwards compatibility
|
|
support_legacy_patterns: true
|
|
migration_assistance: true
|
|
graceful_degradation: true |