This repository was archived by the owner on Jan 2, 2026. It is now read-only.
v0.3.0 - Hook Enhancement v2
Features
New Hooks
- PostToolUse: Surfaces related memories after file operations (Read/Write/Edit)
- PreCompact: Auto-captures high-confidence content before context compaction
Response Guidance
- Configurable response guidance injection via SessionStart
- Three detail levels: minimal, standard, detailed
- Behavioral rules for reliable capture marker detection
Namespace-Aware Markers
- Extended inline markers:
[remember:namespace],@memory:namespace - Automatic namespace validation and fallback
Improvements
Code Quality (QUAL-1)
- Extracted ~200 lines of duplicated utilities into
hook_utils.py - Centralized
setup_logging(),setup_timeout(),cancel_timeout(),read_json_input()
Security (SEC-1)
- Added
validate_file_path()with path traversal protection - 8 comprehensive security tests
Documentation
- Complete documentation for all 5 hooks
- Configuration reference for all hook environment variables
- Usage examples in USER_GUIDE.md
Configuration
New environment variables:
| Variable | Default | Description |
|---|---|---|
HOOK_POST_TOOL_USE_ENABLED |
true |
Enable file-contextual memory injection |
HOOK_POST_TOOL_USE_MIN_SIMILARITY |
0.6 |
Minimum similarity threshold |
HOOK_POST_TOOL_USE_MAX_RESULTS |
3 |
Maximum memories to inject |
HOOK_PRE_COMPACT_ENABLED |
true |
Enable pre-compaction capture |
HOOK_PRE_COMPACT_AUTO_CAPTURE |
true |
Auto-capture without prompting |
HOOK_PRE_COMPACT_MIN_CONFIDENCE |
0.85 |
Minimum confidence for auto-capture |
HOOK_SESSION_START_INCLUDE_GUIDANCE |
true |
Include response guidance |
HOOK_SESSION_START_GUIDANCE_DETAIL |
standard |
Guidance detail level |
Stats
- 1327 tests passing
- 86.34% code coverage
- All quality checks passing
Full Changelog: v0.2.0...v0.3.0