mirror of
https://github.com/SuperClaude-Org/SuperClaude_Framework.git
synced 2025-12-29 16:16:08 +00:00
feat: Implement YAML-first declarative intelligence architecture
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>
This commit is contained in:
385
Framework-Hooks/config/user_experience.yaml
Normal file
385
Framework-Hooks/config/user_experience.yaml
Normal file
@@ -0,0 +1,385 @@
|
||||
# User Experience Intelligence Configuration
|
||||
# UX optimization, project detection, and user-centric intelligence patterns
|
||||
# Enables intelligent user experience through smart defaults and proactive assistance
|
||||
|
||||
# Metadata
|
||||
version: "1.0.0"
|
||||
last_updated: "2025-01-06"
|
||||
description: "User experience optimization and project intelligence patterns"
|
||||
|
||||
# Project Type Detection
|
||||
project_detection:
|
||||
detection_patterns:
|
||||
# Detect project types based on files and structure
|
||||
frontend_frameworks:
|
||||
react_project:
|
||||
file_indicators:
|
||||
- "package.json"
|
||||
- "*.tsx"
|
||||
- "*.jsx"
|
||||
- "react" # in package.json dependencies
|
||||
directory_indicators:
|
||||
- "src/components"
|
||||
- "public"
|
||||
- "node_modules"
|
||||
confidence_threshold: 0.8
|
||||
recommendations:
|
||||
mcp_servers: ["magic", "context7", "playwright"]
|
||||
compression_level: "minimal"
|
||||
performance_focus: "ui_responsiveness"
|
||||
|
||||
vue_project:
|
||||
file_indicators:
|
||||
- "package.json"
|
||||
- "*.vue"
|
||||
- "vue.config.js"
|
||||
- "vue" # in dependencies
|
||||
directory_indicators:
|
||||
- "src/components"
|
||||
- "src/views"
|
||||
confidence_threshold: 0.8
|
||||
recommendations:
|
||||
mcp_servers: ["magic", "context7"]
|
||||
compression_level: "standard"
|
||||
|
||||
angular_project:
|
||||
file_indicators:
|
||||
- "angular.json"
|
||||
- "*.component.ts"
|
||||
- "@angular" # in dependencies
|
||||
directory_indicators:
|
||||
- "src/app"
|
||||
- "e2e"
|
||||
confidence_threshold: 0.9
|
||||
recommendations:
|
||||
mcp_servers: ["magic", "context7", "playwright"]
|
||||
|
||||
backend_frameworks:
|
||||
python_project:
|
||||
file_indicators:
|
||||
- "requirements.txt"
|
||||
- "pyproject.toml"
|
||||
- "setup.py"
|
||||
- "*.py"
|
||||
directory_indicators:
|
||||
- "src"
|
||||
- "tests"
|
||||
- "__pycache__"
|
||||
confidence_threshold: 0.7
|
||||
recommendations:
|
||||
mcp_servers: ["serena", "sequential", "context7"]
|
||||
compression_level: "standard"
|
||||
validation_level: "enhanced"
|
||||
|
||||
node_backend:
|
||||
file_indicators:
|
||||
- "package.json"
|
||||
- "*.js"
|
||||
- "express" # in dependencies
|
||||
- "server.js"
|
||||
directory_indicators:
|
||||
- "routes"
|
||||
- "controllers"
|
||||
- "middleware"
|
||||
confidence_threshold: 0.8
|
||||
recommendations:
|
||||
mcp_servers: ["sequential", "context7", "serena"]
|
||||
|
||||
data_science:
|
||||
jupyter_project:
|
||||
file_indicators:
|
||||
- "*.ipynb"
|
||||
- "requirements.txt"
|
||||
- "conda.yml"
|
||||
directory_indicators:
|
||||
- "notebooks"
|
||||
- "data"
|
||||
confidence_threshold: 0.9
|
||||
recommendations:
|
||||
mcp_servers: ["sequential", "context7"]
|
||||
compression_level: "minimal"
|
||||
analysis_depth: "comprehensive"
|
||||
|
||||
documentation:
|
||||
docs_project:
|
||||
file_indicators:
|
||||
- "*.md"
|
||||
- "docs/"
|
||||
- "README.md"
|
||||
- "mkdocs.yml"
|
||||
directory_indicators:
|
||||
- "docs"
|
||||
- "documentation"
|
||||
confidence_threshold: 0.8
|
||||
recommendations:
|
||||
mcp_servers: ["context7", "sequential"]
|
||||
focus_areas: ["clarity", "completeness"]
|
||||
|
||||
# User Preference Intelligence
|
||||
user_preferences:
|
||||
preference_learning:
|
||||
# Learn user preferences from behavior patterns
|
||||
interaction_patterns:
|
||||
command_preferences:
|
||||
track_command_usage: true
|
||||
track_flag_preferences: true
|
||||
track_workflow_patterns: true
|
||||
learning_window: 100 # operations
|
||||
|
||||
performance_preferences:
|
||||
speed_vs_quality_preference:
|
||||
indicators: ["timeout_tolerance", "quality_acceptance", "performance_complaints"]
|
||||
classification: ["speed_focused", "quality_focused", "balanced"]
|
||||
|
||||
detail_level_preference:
|
||||
indicators: ["verbose_mode_usage", "summary_requests", "detail_requests"]
|
||||
classification: ["concise", "detailed", "adaptive"]
|
||||
|
||||
preference_adaptation:
|
||||
# Adapt behavior based on learned preferences
|
||||
adaptation_strategies:
|
||||
speed_focused_user:
|
||||
optimizations: ["aggressive_caching", "parallel_execution", "reduced_analysis"]
|
||||
ui_changes: ["shorter_responses", "quick_suggestions", "minimal_explanations"]
|
||||
|
||||
quality_focused_user:
|
||||
optimizations: ["comprehensive_analysis", "detailed_validation", "thorough_documentation"]
|
||||
ui_changes: ["detailed_responses", "comprehensive_suggestions", "full_explanations"]
|
||||
|
||||
efficiency_focused_user:
|
||||
optimizations: ["smart_defaults", "workflow_automation", "predictive_suggestions"]
|
||||
ui_changes: ["proactive_help", "automated_optimizations", "efficiency_tips"]
|
||||
|
||||
# Proactive User Assistance
|
||||
proactive_assistance:
|
||||
intelligent_suggestions:
|
||||
# Provide intelligent suggestions based on context
|
||||
optimization_suggestions:
|
||||
- trigger: {repeated_operations: ">5", same_pattern: true}
|
||||
suggestion: "Consider creating a script or alias for this repeated operation"
|
||||
confidence: 0.8
|
||||
category: "workflow_optimization"
|
||||
|
||||
- trigger: {performance_issues: "detected", duration: ">3_sessions"}
|
||||
suggestion: "Performance optimization recommendations available"
|
||||
action: "show_performance_guide"
|
||||
confidence: 0.9
|
||||
category: "performance"
|
||||
|
||||
- trigger: {error_pattern: "recurring", count: ">3"}
|
||||
suggestion: "Automated error recovery pattern available"
|
||||
action: "enable_auto_recovery"
|
||||
confidence: 0.85
|
||||
category: "error_prevention"
|
||||
|
||||
contextual_help:
|
||||
# Provide contextual help and guidance
|
||||
help_triggers:
|
||||
- context: {new_user: true, session_count: "<5"}
|
||||
help_type: "onboarding_guidance"
|
||||
content: "Getting started tips and best practices"
|
||||
|
||||
- context: {error_rate: ">10%", recent_errors: ">3"}
|
||||
help_type: "troubleshooting_assistance"
|
||||
content: "Common error solutions and debugging tips"
|
||||
|
||||
- context: {complex_operation: true, user_expertise: "beginner"}
|
||||
help_type: "step_by_step_guidance"
|
||||
content: "Detailed guidance for complex operations"
|
||||
|
||||
# Smart Defaults Intelligence
|
||||
smart_defaults:
|
||||
context_aware_defaults:
|
||||
# Generate smart defaults based on context
|
||||
project_based_defaults:
|
||||
react_project:
|
||||
default_mcp_servers: ["magic", "context7"]
|
||||
default_compression: "minimal"
|
||||
default_analysis_depth: "ui_focused"
|
||||
default_validation: "component_focused"
|
||||
|
||||
python_project:
|
||||
default_mcp_servers: ["serena", "sequential"]
|
||||
default_compression: "standard"
|
||||
default_analysis_depth: "comprehensive"
|
||||
default_validation: "enhanced"
|
||||
|
||||
documentation_project:
|
||||
default_mcp_servers: ["context7"]
|
||||
default_compression: "minimal"
|
||||
default_analysis_depth: "content_focused"
|
||||
default_validation: "readability_focused"
|
||||
|
||||
dynamic_configuration:
|
||||
# Dynamically adjust configuration
|
||||
configuration_adaptation:
|
||||
performance_based:
|
||||
triggers:
|
||||
- condition: {system_performance: "high"}
|
||||
adjustments: {analysis_depth: "comprehensive", features: "all_enabled"}
|
||||
|
||||
- condition: {system_performance: "low"}
|
||||
adjustments: {analysis_depth: "essential", features: "performance_focused"}
|
||||
|
||||
user_expertise_based:
|
||||
triggers:
|
||||
- condition: {user_expertise: "expert"}
|
||||
adjustments: {verbosity: "minimal", automation: "high", warnings: "reduced"}
|
||||
|
||||
- condition: {user_expertise: "beginner"}
|
||||
adjustments: {verbosity: "detailed", automation: "guided", warnings: "comprehensive"}
|
||||
|
||||
# Error Recovery Intelligence
|
||||
error_recovery:
|
||||
intelligent_error_handling:
|
||||
# Smart error handling and recovery
|
||||
error_classification:
|
||||
user_errors:
|
||||
- type: "syntax_error"
|
||||
recovery: "suggest_correction"
|
||||
user_guidance: "detailed"
|
||||
|
||||
- type: "configuration_error"
|
||||
recovery: "auto_fix_with_approval"
|
||||
user_guidance: "educational"
|
||||
|
||||
- type: "workflow_error"
|
||||
recovery: "suggest_alternative_approach"
|
||||
user_guidance: "workflow_tips"
|
||||
|
||||
system_errors:
|
||||
- type: "performance_degradation"
|
||||
recovery: "automatic_optimization"
|
||||
user_notification: "informational"
|
||||
|
||||
- type: "resource_exhaustion"
|
||||
recovery: "resource_management_mode"
|
||||
user_notification: "status_update"
|
||||
|
||||
- type: "service_unavailable"
|
||||
recovery: "graceful_fallback"
|
||||
user_notification: "service_status"
|
||||
|
||||
recovery_learning:
|
||||
# Learn from error recovery patterns
|
||||
recovery_effectiveness:
|
||||
track_recovery_success: true
|
||||
learn_recovery_patterns: true
|
||||
improve_recovery_strategies: true
|
||||
|
||||
user_recovery_preferences:
|
||||
learn_preferred_recovery: true
|
||||
adapt_recovery_approach: true
|
||||
personalize_error_handling: true
|
||||
|
||||
# User Expertise Detection
|
||||
expertise_detection:
|
||||
expertise_indicators:
|
||||
# Detect user expertise level
|
||||
behavioral_indicators:
|
||||
command_proficiency:
|
||||
indicators: ["advanced_flags", "complex_operations", "custom_configurations"]
|
||||
weight: 0.4
|
||||
|
||||
error_recovery_ability:
|
||||
indicators: ["self_correction", "minimal_help_needed", "independent_problem_solving"]
|
||||
weight: 0.3
|
||||
|
||||
workflow_sophistication:
|
||||
indicators: ["efficient_workflows", "automation_usage", "advanced_patterns"]
|
||||
weight: 0.3
|
||||
|
||||
expertise_adaptation:
|
||||
# Adapt interface based on expertise
|
||||
beginner_adaptations:
|
||||
interface: ["detailed_explanations", "step_by_step_guidance", "comprehensive_warnings"]
|
||||
defaults: ["safe_options", "guided_workflows", "educational_mode"]
|
||||
|
||||
intermediate_adaptations:
|
||||
interface: ["balanced_explanations", "contextual_help", "smart_suggestions"]
|
||||
defaults: ["optimized_workflows", "intelligent_automation", "performance_focused"]
|
||||
|
||||
expert_adaptations:
|
||||
interface: ["minimal_explanations", "advanced_options", "efficiency_focused"]
|
||||
defaults: ["maximum_automation", "performance_optimization", "minimal_interruptions"]
|
||||
|
||||
# User Satisfaction Intelligence
|
||||
satisfaction_intelligence:
|
||||
satisfaction_tracking:
|
||||
# Track user satisfaction indicators
|
||||
satisfaction_metrics:
|
||||
task_completion_rate:
|
||||
weight: 0.3
|
||||
target_threshold: 0.85
|
||||
|
||||
error_resolution_speed:
|
||||
weight: 0.25
|
||||
target_threshold: "fast"
|
||||
|
||||
feature_adoption_rate:
|
||||
weight: 0.2
|
||||
target_threshold: 0.6
|
||||
|
||||
user_feedback_sentiment:
|
||||
weight: 0.25
|
||||
target_threshold: "positive"
|
||||
|
||||
satisfaction_optimization:
|
||||
# Optimize for user satisfaction
|
||||
optimization_strategies:
|
||||
low_satisfaction_triggers:
|
||||
- trigger: {completion_rate: "<0.7"}
|
||||
action: "simplify_workflows"
|
||||
priority: "high"
|
||||
|
||||
- trigger: {error_rate: ">15%"}
|
||||
action: "improve_error_prevention"
|
||||
priority: "critical"
|
||||
|
||||
- trigger: {feature_adoption: "<0.3"}
|
||||
action: "improve_feature_discoverability"
|
||||
priority: "medium"
|
||||
|
||||
# Personalization Engine
|
||||
personalization:
|
||||
adaptive_interface:
|
||||
# Personalize interface based on user patterns
|
||||
interface_personalization:
|
||||
layout_preferences:
|
||||
learn_preferred_layouts: true
|
||||
adapt_information_density: true
|
||||
customize_interaction_patterns: true
|
||||
|
||||
content_personalization:
|
||||
learn_content_preferences: true
|
||||
adapt_explanation_depth: true
|
||||
customize_suggestion_types: true
|
||||
|
||||
workflow_optimization:
|
||||
# Optimize workflows for individual users
|
||||
personal_workflow_learning:
|
||||
common_task_patterns: true
|
||||
workflow_efficiency_analysis: true
|
||||
personalized_shortcuts: true
|
||||
|
||||
workflow_recommendations:
|
||||
suggest_workflow_improvements: true
|
||||
recommend_automation_opportunities: true
|
||||
provide_efficiency_insights: true
|
||||
|
||||
# Accessibility Intelligence
|
||||
accessibility:
|
||||
adaptive_accessibility:
|
||||
# Adapt interface for accessibility needs
|
||||
accessibility_detection:
|
||||
detect_accessibility_needs: true
|
||||
learn_accessibility_preferences: true
|
||||
adapt_interface_accordingly: true
|
||||
|
||||
inclusive_design:
|
||||
# Ensure inclusive user experience
|
||||
inclusive_features:
|
||||
multiple_interaction_modes: true
|
||||
flexible_interface_scaling: true
|
||||
comprehensive_keyboard_support: true
|
||||
screen_reader_optimization: true
|
||||
Reference in New Issue
Block a user