feat(cli): Implement full hooks system in Rust CLI

Add comprehensive hooks subcommand to ruvector CLI with:

Core Commands:
- init: Initialize hooks in project
- install: Install hooks into Claude settings
- stats: Show intelligence statistics

Hook Operations:
- pre-edit/post-edit: File editing intelligence
- pre-command/post-command: Command execution hooks
- session-start/session-end: Session management
- pre-compact: Pre-compact hook

Memory & Learning:
- remember: Store content in semantic memory
- recall: Search memory semantically
- learn: Record Q-learning trajectories
- suggest: Get best action for state
- route: Route task to best agent

V3 Intelligence:
- record-error: Learn from error patterns
- suggest-fix: Get fixes for error codes
- suggest-next: Predict next files to edit
- should-test: Check if tests should run

Swarm/Hive-Mind:
- swarm-register: Register agents
- swarm-coordinate: Record coordination
- swarm-optimize: Optimize task distribution
- swarm-recommend: Get best agent
- swarm-heal: Handle agent failures
- swarm-stats: Show swarm statistics

All commands tested and working. Data persists to
~/.ruvector/intelligence.json for cross-session learning.
This commit is contained in:
Claude 2025-12-27 01:08:36 +00:00
parent b3b6e00b1a
commit 4ab66c7314
No known key found for this signature in database
5 changed files with 1448 additions and 15 deletions

File diff suppressed because it is too large Load diff

View file

@ -3,9 +3,11 @@
pub mod commands;
pub mod format;
pub mod graph;
pub mod hooks;
pub mod progress;
pub use commands::*;
pub use format::*;
pub use graph::*;
pub use hooks::*;
pub use progress::ProgressTracker;