Backtesting:
- Single-pass metrics calculation (was 10+ passes)
- Inline stats: mean, variance, win/loss counts computed together
- Combined drawdown metrics in one pass
- Removed redundant method calls
Risk Management:
- Ring buffers for trade history (O(1) vs O(n) shift/slice)
- Running sum for volatility average (O(1) vs O(n) reduce)
- Incremental loss count tracking
Reduces iteration overhead by ~5-10x for large datasets.
- gnn-correlation-network.js: Added RollingStats class for O(1) incremental
updates and correlation caching with TTL to avoid redundant O(n²) calculations
- attention-regime-detection.js: Optimized matmul with cache-friendly i-k-j
loop order and added empty matrix guards
- quantum-portfolio-optimization.js: Added ComplexPool for object reuse to
reduce GC pressure, plus in-place operations (addInPlace, multiplyInPlace,
scaleInPlace) to avoid allocations in hot loops
- multi-agent-swarm.js: Added RingBuffer for O(1) bounded memory operations
and SignalPool for signal object reuse
Key fixes across exotic neural-trader examples:
- reinforcement-learning-agent.js: Fixed broken backpropagation that only
updated output layer. Now stores activations and flows gradients through
all hidden layers properly.
- quantum-portfolio-optimization.js: Fixed QAOA mixer Hamiltonian that was
incorrectly accumulating all qubit operations. Now applies Rx rotations
sequentially per-qubit with proper normalization.
- hyperbolic-embeddings.js: Fixed Math.acosh/atanh domain errors and
implemented proper Riemannian gradient descent using expMap in Poincaré
ball model.
- multi-agent-swarm.js: Added division-by-zero guards for linear regression,
z-score calculation, and iterator type fixes. Added memory bounds.
- gnn-correlation-network.js: Added guards for betweenness normalization
(n<3), density (n<2), and clustering/degree calculations (n=0).
- attention-regime-detection.js: Added empty array handling for softmax and
matrix validation for transpose operations.
- atomic-arbitrage.js: Added guard for flash loan spread calculation.
- Added hooks feature summary near top of README.md
- Created comprehensive HOOKS.md documentation
- Links to detailed docs for pretrain, build-agents, verify, etc.
- Intelligence now saves to .ruvector/intelligence.json in project dir
- Falls back to ~/.ruvector/ only if no project context found
- Prefers project-local when .ruvector/ or .claude/ exists
- Fixes verify showing 'will be created' after pretrain
- Added CLAUDE.md creation to 'hooks init' command
- Includes complete hooks documentation and CLI commands
- Added --no-claude-md flag to skip CLAUDE.md creation
- Respects existing CLAUDE.md unless --force is used
- Fixes $schema to correct URL
- Removes invalid Start/End hooks (renamed to SessionStart/Stop)
- Preserves other existing settings when merging
Bumps to v0.1.43
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Removed legacy /npm/ruvector/ (v0.1.38) in favor of
/npm/packages/ruvector/ (v0.1.42) which is actively maintained
and published to npm.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add chrono dependency to Cargo.toml
- Replace pgrx::TimestampWithTimeZone with chrono::Utc strings
- Fix temporary reference error in analysis.rs
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Format fixes based on Claude Code validation:
- matcher: string regex (e.g., "Edit|Write|MultiEdit") not object
- SessionStart/Stop: require { hooks: [...] } wrapper
Bumps to v0.1.42
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Updates hooks to use new object-based format:
- matcher: { tools: [...] } instead of string
- hooks: [{ type: "command", command: "..." }] instead of string array
Required by Claude Code's updated hooks schema.
Bumps to v0.1.41
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The hooks init command now generates settings.json with
npx ruvector hooks instead of ruvector hooks, ensuring
commands work without global installation.
Bumps to v0.1.40
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Updates all hook commands to use npx ruvector instead of ruvector
for portability (no global install required).
Updated files:
- .claude/settings.json - all hooks now use npx ruvector
- CLAUDE.md - documentation updated to npx ruvector
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Comprehensive documentation for hooks including:
- init, session-start, session-end
- pre-edit, post-edit with success/error recording
- pre-command, post-command with risk analysis
- route for agent recommendations
- remember/recall for vector memory
- suggest-context for relevant context
- stats for intelligence statistics
- swarm-recommend for task routing
- Configuration example for .claude/settings.json
- Explanation of how self-learning works
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Prevents wasm-pack from regenerating .gitignore files that block npm
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove wasm-pack generated .gitignore files that were blocking
npm from including the pkg/ and pkg-node/ WASM binaries.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Feature comparison table showing:
- Performance (WASM advantage)
- Unique features (critical path, attention, persistence)
- TypeScript support
- Bundle sizes
Plus 'When to Use What' guide for choosing the right library
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Quote-style hook question
- 3-line code snippet showing value immediately
- Box-style ASCII diagram (more professional)
- Question/Method/Answer table format
- Expanded use cases with examples
- Added Game AI and Workflow Engines
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Lead with the problem, not technical jargon
- Visual task dependency diagram
- Show what each method answers
- Real-world use cases with emojis
- Before/after comparison table
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Easy introduction to DAGs and rudag
- Features and benefits overview
- Detailed use cases (SQL optimizer, task scheduler, build system, ETL)
- Integration examples (Express, React, D3.js, Bull, GraphQL, RxJS)
- CLI documentation
- Full API reference
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
SECURITY FIXES (HIGH):
- Path traversal prevention in CLI (validateFilePath)
- Path traversal prevention in FileDagStorage (ensureWithinBase)
- Input validation for all public APIs (isValidDagId, isValidStorageId)
- Type guards for WASM output (isCriticalPath) to prevent prototype pollution
- Extension restrictions (.dag, .json only) in CLI
MEMORY LEAK FIXES (HIGH):
- Static methods now properly close owned storage connections
- WASM cleanup on initialization failures
- Cache invalidation on dispose()
PERFORMANCE OPTIMIZATIONS:
- Single-transaction IndexedDB saves (atomic read-modify-write)
- Batch save API for bulk operations (saveBatch)
- Result caching for topoSort and criticalPath
- Lazy module loading in CLI for faster startup
OTHER IMPROVEMENTS:
- onblocked/onversionchange handlers for IndexedDB
- Background save error handler (onSaveError option)
- Comprehensive input validation with clear error messages
- Convert sync to async file operations in Node.js
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Create npm/packages/rudag with TypeScript SDK
- WASM-accelerated DAG operations via ruvector-dag-wasm
- IndexedDB persistence for browser environments
- MemoryStorage fallback for Node.js
- CLI tool for DAG operations (rudag command)
- Restore patches/hnsw_rs for WASM builds
Features:
- DagOperator enum (SCAN, FILTER, PROJECT, JOIN, etc.)
- AttentionMechanism enum (TOPOLOGICAL, CRITICAL_PATH, UNIFORM)
- RuDag class with auto-save to IndexedDB
- BrowserDagManager for browser-specific management
- NodeDagManager with file-based persistence
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>