feat: Enhanced Framework-Hooks with comprehensive testing and validation

- Update compression engine with improved YAML handling and error recovery
- Add comprehensive test suite with 10 test files covering edge cases
- Enhance hook system with better MCP intelligence and pattern detection
- Improve documentation with detailed configuration guides
- Add learned patterns for project optimization
- Strengthen notification and session lifecycle hooks

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
NomenAK
2025-08-05 22:20:42 +02:00
parent cee59e343c
commit 73dfcbb228
30 changed files with 5365 additions and 40 deletions

View File

@@ -56,8 +56,10 @@ class PreCompactHook:
self.mcp_intelligence = MCPIntelligence()
self.compression_engine = CompressionEngine()
# Initialize learning engine
cache_dir = Path("cache")
# Initialize learning engine with installation directory cache
import os
cache_dir = Path(os.path.expanduser("~/.claude/cache"))
cache_dir.mkdir(parents=True, exist_ok=True)
self.learning_engine = LearningEngine(cache_dir)
# Load hook-specific configuration from SuperClaude config
@@ -318,7 +320,7 @@ class PreCompactHook:
content_type = metadata.get('content_type', '')
file_path = metadata.get('file_path', '')
if any(pattern in file_path for pattern in ['/SuperClaude/', '/.claude/', 'framework']):
if any(pattern in file_path for pattern in ['/.claude/', 'framework']):
framework_score += 3
if any(pattern in content_type for pattern in user_indicators):