This commit adds the read path (Cortex) to complement the write path (Spine): ## Crates - stemedb-api: HTTP API with axum + utoipa OpenAPI - /v1/assert, /v1/query, /v1/epoch, /v1/skeptic, /v1/trace, /v1/audit - Metered endpoints with quota enforcement - Ed25519 signature verification - stemedb-lens: Truth resolution lenses - RecencyLens, ConsensusLens, ConfidenceLens - VoteAwareConsensusLens (Ballot Box pattern) - TrustAwareAuthorityLens (The Hive pattern) - SkepticLens (conflict analysis) - EpochAwareLens (paradigm-safe queries) - stemedb-query: Query engine with materialized views ## Storage Extensions - VoteStore: Vote aggregation with cached counts - TrustRankStore: Agent reputation with decay - AuditStore: Query audit trail - IndexStore: SP/P/S index structures - SupersessionStore: Epoch supersession chains ## SDKs - sdk/go/steme: Go HTTP client with Ed25519 signing - sdk/go/adk: ADK-Go tools for AI agents ## Documentation - Updated CLAUDE.md, architecture.md, roadmap.md - New ai-lookup entries for all services - Use case docs for consumer health intelligence - Arena roadmap for simulation advancement Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
68 lines
2.0 KiB
Markdown
68 lines
2.0 KiB
Markdown
# Assertion
|
|
|
|
**Last Updated:** 2026-01-31
|
|
**Confidence:** High
|
|
|
|
## Summary
|
|
|
|
The Assertion is the atomic unit of Episteme. It represents a signed claim about reality, not a mutable fact.
|
|
|
|
**Key Facts:**
|
|
- Immutable once written (append-only)
|
|
- Content-addressed by BLAKE3 hash
|
|
- Contains: subject, predicate, object, lifecycle, source, signatures, timestamp
|
|
- Lifecycle stage distinguishes proposals from production-ready truth
|
|
- Optionally includes vector embedding for semantic search
|
|
|
|
**File Pointer:** `crates/stemedb-core/src/types.rs`
|
|
|
|
## Structure
|
|
|
|
```rust
|
|
pub struct Assertion {
|
|
// The Fact (What)
|
|
pub subject: EntityId, // "Tesla_Inc"
|
|
pub predicate: RelationId, // "has_revenue"
|
|
pub object: ObjectValue, // Text, Number, Boolean, or Reference
|
|
|
|
// Lineage (Why)
|
|
pub parent_hash: Option<Hash>, // Fork pointer
|
|
pub source_hash: Hash, // Evidence pointer (PDF/URL hash)
|
|
pub visual_hash: Option<PHash>, // Perceptual hash for visual anchoring
|
|
pub epoch: Option<EpochId>, // Paradigm context
|
|
pub lifecycle: LifecycleStage, // Proposed, UnderReview, Approved, Deprecated, Rejected
|
|
|
|
// Meta-Cognition (Who/How sure)
|
|
pub signatures: Vec<SignatureEntry>, // Multi-sig support
|
|
pub confidence: f32, // 0.0 to 1.0
|
|
pub timestamp: u64, // Wall clock time
|
|
pub vector: Option<Vec<f32>>, // Semantic embedding
|
|
}
|
|
```
|
|
|
|
## Lifecycle Stages
|
|
|
|
```rust
|
|
enum LifecycleStage {
|
|
Proposed, // Initial idea, RFC, suggestion
|
|
UnderReview, // Under active debate
|
|
Approved, // Production ready, safe for implementation
|
|
Deprecated, // Was true, now superseded
|
|
Rejected, // Considered and declined
|
|
}
|
|
```
|
|
|
|
New assertions default to `Proposed`. Lifecycle transitions are implemented as new assertions with `parent_hash` pointing to the previous version.
|
|
|
|
## Identity
|
|
|
|
Assertion ID = BLAKE3(serialized assertion bytes)
|
|
|
|
Content-addressed: same content = same hash.
|
|
|
|
## Related Topics
|
|
|
|
- [Lifecycle Stages](./lifecycle.md)
|
|
- [Storage Layout](./storage.md)
|
|
- [Lens Resolution](./lens.md)
|