Fixes across attention mechanisms, SONA engine, and examples:
Attention mechanisms:
- hierarchical_lorentz: Use dag.node_count(), dag.children() API
- parallel_branch: Replace get_children() with children()
- temporal_btsp: Fix node.estimated_cost access, remove selectivity
- cache: Use dag.node_ids() and dag.children() for iteration
- mincut_gated: Fix return type to match DagAttentionMechanism trait
- selector: Update tests to use OperatorNode::new()
SONA/QuDAG:
- sona/engine: Add deprecated Scan/Join match arms
- ml_kem: Fix unused parameter warnings
- ml_dsa: Fix unused parameter warnings
Examples:
- basic_usage: Use dag.children() instead of get_children()
- learning_workflow: Fix HnswScan/Sort field names, trajectory access
- attention_demo: Import DagAttentionMechanism trait
- attention_selection: Fix CausalConeConfig field names
- self_healing: Remove non-existent result fields
- federated_coherence: Add parentheses for comparison expression
Cargo.toml:
- Register all exotic examples with explicit paths
All 12 examples now build and run successfully.
Six examples demonstrating systems that respond to internal tension
rather than external commands. Intelligence as homeostasis.
1. synthetic_reflex_organism.rs (286 lines)
- No global objective function
- Minimizes structural stress over time
- Learns only when instability crosses thresholds
- "Intelligence as homeostasis, not problem-solving"
2. timing_synchronization.rs (334 lines)
- Machines that feel timing, not data
- Measures when things stop lining up
- Synchronizes with biological rhythms
- "You stop predicting intent. You synchronize with it."
3. coherence_safety.rs (442 lines)
- Capability degradation: Full → Reduced → Conservative → Minimal → Halted
- Self-halts when internal coherence drops
- "Safety becomes structural, not moral"
4. artificial_instincts.rs (406 lines)
- Biases enforced by mincut/attention/healing
- Avoid fragmentation, preserve causality, prefer reversibility
- "Closer to evolution than training"
5. living_simulation.rs (349 lines)
- Simulations that maintain stability under perturbation
- Exposes fragile boundaries, not forecasts
- "No longer modeling reality. Modeling fragility."
6. thought_integrity.rs (421 lines)
- Reasoning integrity monitored like voltage
- Reduce precision, exit early, route to simpler paths
- "Always-on intelligence without runaway cost"
Total: 2,238 lines of exotic coherence-sensing code
- 130KB raw, 58KB gzipped WASM binary
- 13-method API surface (add_node, add_edge, topo_sort, critical_path, attention)
- 3 attention mechanisms (topological, critical path, uniform)
- Binary and JSON serialization
- wee_alloc feature for even smaller builds
- TypeScript type definitions included
Also updates ruvector-dag README with:
- Design philosophy: MinCut as central control signal
- Policy layer for attention mechanism selection
- SONA state vector structure with per-operator LoRA weights
- Predictive healing based on rising cut tension
- External cost model trait for PostgreSQL/embedded/chip schedulers
- QuDAG sync frequency bounds (1min-1hr adaptive)
- End-to-end convergence example with logs
- Add self-learning intelligence hooks for Claude Code
- Include Q-learning patterns, vector memories, file sequences
- Add pre-edit/post-edit, pre-command/post-command hooks
- Add session management and swarm coordination
- Bump version to 0.1.36
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add version = "0.1.29" to ruvector-mincut dependency in mincut-wasm
- Add version = "0.1.29" to ruvector-mincut dependency in mincut-node
- Add version = "0.1.29" to ruvector-core dependency in rvlite
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add description, keywords, categories to ruvector-nervous-system
- Add metadata and README to ruvector-mincut-wasm
- Add metadata and README to ruvector-mincut-node
- Remove cargo publish restriction from settings.json
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update @ruvector/core to 0.1.29
- Update all platform dependencies to 0.1.29
- Published: ruvector-core-{linux-x64-gnu,linux-arm64-gnu,darwin-x64,darwin-arm64,win32-x64-msvc}@0.1.29
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove "type": "module" that conflicted with NAPI-RS CommonJS output
- Bump @ruvector/node to 0.1.19
- Update optionalDependencies to 0.1.19
- Update hooks to use absolute path to ruvector-cli
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The Rust CLI uses --memory-type, not --type.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Copy CLI package to /tmp before npm install
- This prevents npm from finding the parent workspace lockfile
- Copy back node_modules and dist after build
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove workspace package-lock.json for CLI tests
- Install only CLI's own dependencies to avoid platform-specific packages
- Update paths to work from npm/packages/cli directory
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Run npm install from workspace root with --omit=optional
- Build using workspace flag -w @ruvector/cli
- Update test paths to packages/cli/dist/cli.js
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Change dtolnay/rust-action to dtolnay/rust-toolchain
- Add --ignore-scripts --no-optional to npm install to avoid platform issues
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Resolves merge conflicts in intelligence data files.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add --postgres flag to `ruvector hooks init` command
- Automatically apply PostgreSQL schema using embedded SQL
- Check for RUVECTOR_POSTGRES_URL or DATABASE_URL environment variable
- Provide helpful error messages and manual instructions if psql unavailable
- Update README with new --postgres flag documentation
- Convert serde_json::Value to string for ToSql in remember()
- Parse metadata string back to JSON in recall()
- Pass get_intelligence_path() to Intelligence::new()
- Make get_intelligence_path() public for cross-module access
New hooks added:
- UserPromptSubmit: Inject learned context before processing prompts
- Notification: Track notification patterns
- Task matcher in PreToolUse: Validate agent assignments before spawning
New commands:
- suggest-context: Returns learned patterns for context injection
- track-notification: Records notification events as trajectories
Optimizations:
- Timeout tuning: 1-5s per hook (vs 60s default)
- SessionStart: Separate startup vs resume matchers
- PreCompact: Separate auto vs manual matchers
- Stdin JSON parsing: Full HookInput struct with all Claude Code fields
- Context injection: HookOutput with additionalContext for PostToolUse
Technical improvements:
- HookInput struct: session_id, tool_input, tool_response, notification_type
- HookOutput struct: additionalContext, permissionDecision for control flow
- try_parse_stdin(): Non-blocking JSON parsing from stdin
- output_context_injection(): Helper for PostToolUse context injection
Now covers all 7 Claude Code hook types with optimized timeouts.
Explain the value proposition in plain language:
- AI assistants start fresh every session
- RuVector Hooks gives them memory and intuition
- Four key benefits: remembers, learns, predicts, coordinates
Add 4 cutting-edge research examples:
- t4_neuromorphic_rag: Coherence-gated retrieval for LLM memory with 100x
compute reduction when predictions are confident
- t4_agentic_self_model: Agent that models its own cognitive state, knows
when it's capable, and makes task acceptance decisions
- t4_collective_dreaming: Swarm consolidation during downtime with
hippocampal replay and cross-agent memory transfer
- t4_compositional_hdc: Zero-shot concept composition via HDC binding
operations including analogy solving (king-man+woman=queen)
Improve README with:
- Clearer, more accessible introduction
- Mermaid diagrams for architecture visualization
- Better layer-by-layer feature descriptions
- Complete Tier 1-4 example listings
- Data flow sequence diagram
- Updated scorecard metrics section
Security Fixes:
- Fix division by zero in temporal/hybrid sharding (window_size validation)
- Fix panic in KWTALayer::select when threshold filters all candidates
- Add size > 0 validation to WTALayer constructor
- Document SPSC constraints on lock-free EventRingBuffer
Cost Reduction Features:
- HysteresisTracker: Require N consecutive ticks above threshold before
triggering modulation, preventing flapping on noisy signals
- BudgetGuardrail: Auto-decelerate when hourly spend exceeds budget,
multiplying duty factor by reduction coefficient
Metrics Scorecard:
- Add write amplification tracking (memory_writes / meaningful_events)
- Add NervousSystemScorecard with health checks and scoring
- Add ScorecardTargets for configurable thresholds
- Five key metrics: silence ratio, TTD P50/P95, energy/spike,
write amplification, calmness index
Philosophy: Time awareness is not about intelligence.
It is about restraint. Systems that stay quiet, wait,
and then react with intent.
Tests: 359 passing, 82 doc tests passing