stemedb/use-cases/README.md
jordan 1ce4004807 feat: Complete Phase 2 (The Cortex) - query, lens, and API layers
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>
2026-02-01 13:22:44 -07:00

56 lines
2.1 KiB
Markdown

# Episteme Use Cases
Real-world scenarios that demonstrate why Episteme exists and what it enables that traditional databases cannot.
## The Postgres Test
Every use case must answer: **"Could I build this with Postgres + a clever schema?"**
If yes → It's not a compelling use case.
If no → Identify which Episteme pillar makes it impossible.
## The Four Pillars
| Pillar | What It Enables | Postgres Gap |
|--------|-----------------|--------------|
| **First-Class Contradiction** | DB holds conflicting facts without forcing resolution | Must pick one value or version-table chaos |
| **Invalidation Cascades** | Retracted evidence flags all downstream decisions | Recursive CTEs don't scale, app logic drifts |
| **Multi-Signature Consensus** | Weighted trust via cryptographic co-signatures | Join tables have no cryptographic proof |
| **Semantic Decay** | Old data fades from hot path but remains auditable | Manual WHERE clauses, inconsistent decay rates |
## Use Case Tiers
### Tier 1: Production-Ready
| Use Case | Pillars | Status |
|----------|---------|--------|
| [Consumer Health Intelligence](./consumer-health-intelligence.md) | All Four | Draft |
| [Financial Due Diligence](./financial-due-diligence.md) | All Four | Draft |
| [Agile AI Agent Team](./agile-agent-team.md) | All Four | Draft |
| Life Sciences Evidence Chains | All Four | Planned |
### Tier 2: Hello World
| Use Case | Pillars | Status |
|----------|---------|--------|
| Competing News Sources | Contradiction, Decay | Planned |
### Tier 3: Dropped (Failed Postgres Test)
| Use Case | Why Dropped |
|----------|-------------|
| ~~Coding Agent Branch Simulation~~ | Git + CI already does this. Not a database problem. |
## Contributing Use Cases
When adding a use case:
1. Apply the Postgres Test rigorously
2. Lead with the catastrophe (what goes wrong without Episteme)
3. Show failing SQL for each feature
4. Map to specific pillars
5. Include a 5-minute local demo variant
6. Be honest about what Postgres CAN do
Template: See [financial-due-diligence.md](./financial-due-diligence.md) for structure.