Merge commit 'd803bfe2b1fe7f5e219e50ac20d6801a0a58ac75' as 'vendor/ruvector'

This commit is contained in:
ruv
2026-02-28 14:39:40 -05:00
7854 changed files with 3522914 additions and 0 deletions

View File

@@ -0,0 +1,52 @@
# ADR-CE-016: RuvLLM CoherenceValidator Uses Sheaf Energy
**Status**: Accepted
**Date**: 2026-01-22
**Parent**: ADR-014 Coherence Engine Architecture
## Context
RuvLLM's `CoherenceValidator` currently uses heuristic scoring to detect:
- Semantic inconsistency
- Factual contradictions
- Logical errors
These heuristics are:
- Pattern-based (can be fooled)
- Not mathematically grounded
- Difficult to explain
## Decision
**RuvLLM CoherenceValidator uses sheaf energy, not heuristic scores.**
Integration:
```rust
pub struct SheafCoherenceValidator {
graph: SheafGraph,
gate: CoherenceGate,
inner: CoherenceValidator, // Fallback
}
```
Process:
1. Convert context and response to sheaf nodes
2. Add edges for semantic implications
3. Compute coherence energy
4. Gate decision replaces heuristic score
## Consequences
### Benefits
- Mathematical proof of inconsistency, not pattern matching
- Explainable: can show which edges have high residuals
- Unified with Prime-Radiant governance
### Risks
- Requires embedding quality for node states
- Edge creation logic needs domain expertise
## References
- ADR-014: Coherence Engine Architecture, "RuvLLM Integration"
- ruvllm/src/quality/coherence.rs