Initial commit: Claude Code Hooks with Diátaxis documentation

 Features:
- 🧠 Shadow learner that builds intelligence from command patterns
- 🛡️ Smart command validation with safety checks
- 💾 Automatic context monitoring and backup system
- 🔄 Session continuity across Claude restarts

📚 Documentation:
- Complete Diátaxis-organized documentation
- Learning-oriented tutorial for getting started
- Task-oriented how-to guides for specific problems
- Information-oriented reference for quick lookup
- Understanding-oriented explanations of architecture

🚀 Installation:
- One-command installation script
- Bootstrap prompt for installation via Claude
- Cross-platform compatibility
- Comprehensive testing suite

🎯 Ready for real-world use and community feedback!

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Ryan Malloy 2025-07-19 18:25:34 -06:00
commit 162ca67098
34 changed files with 5904 additions and 0 deletions

View file

@ -0,0 +1,12 @@
{
"hooks": {
"UserPromptSubmit": "python3 {{INSTALL_PATH}}/hooks/context_monitor.py",
"PreToolUse": {
"Bash": "python3 {{INSTALL_PATH}}/hooks/command_validator.py"
},
"PostToolUse": {
"*": "python3 {{INSTALL_PATH}}/hooks/session_logger.py"
},
"Stop": "python3 {{INSTALL_PATH}}/hooks/session_finalizer.py"
}
}

41
config/settings.json Normal file
View file

@ -0,0 +1,41 @@
{
"context_monitor": {
"backup_threshold": 0.85,
"emergency_threshold": 0.95,
"max_context_tokens": 200000,
"tokens_per_char": 0.25,
"tool_overhead": 200,
"system_overhead": 500
},
"backup_manager": {
"max_backups": 10,
"backup_on_critical_ops": true,
"git_enabled": true,
"filesystem_backup_enabled": true
},
"shadow_learner": {
"max_patterns": 10000,
"confidence_threshold": 0.8,
"evidence_threshold": 5,
"cache_ttl_seconds": 300,
"learning_enabled": true
},
"security": {
"dangerous_commands_blocked": true,
"suspicious_commands_warned": true,
"path_traversal_protection": true,
"system_files_protection": true
},
"performance": {
"rate_limit_ms": 100,
"max_hook_execution_time": 5000,
"async_logging": true,
"cache_predictions": true
},
"logging": {
"log_level": "INFO",
"log_executions": true,
"log_retention_days": 7,
"detailed_errors": false
}
}