stemedb/docs/presentations/data/consumer-health-intelligence.yaml
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

392 lines
12 KiB
YAML

meta:
id: consumer-health-intelligence
title: "Consumer Health Intelligence"
subtitle: "The Living Truth Layer"
version: "1.0.0"
actors: {}
slides:
# ============================================
# TITLE
# ============================================
- type: title
id: title
# ============================================
# HOOK
# ============================================
- type: hook
id: hook
line: "Your sources contradict each other."
subline: "And you have no way to weigh them."
# ============================================
# THE DRIFT - Seven sources, one hour
# ============================================
- type: code
id: drift-doctor
title: "Source 1: Your doctor"
code: |
"Well-tolerated. Nausea is common but transient."
// Confidence: high (MD, treating physician)
// Basis: prescribing guidelines, clinical experience
// What's missing: doesn't see Reddit, doesn't see FAERS
- type: code
id: drift-fda
title: "Source 2: The FDA label"
code: |
WARNING: Thyroid C-cell tumors (boxed warning)
Adverse reactions:
- Nausea (44%)
- Diarrhea (30%)
- Vomiting (24%)
// No mention of gastroparesis (yet).
// Label last updated: 2021.
- type: code
id: drift-reddit
title: "Source 3: Reddit (1.2M members)"
code: |
r/Ozempic - sorted by top, past month:
"Ozempic face is real. I look 10 years older." [2.1k upvotes]
"Month 3: can't eat, stomach won't empty" [1.8k upvotes]
"Hair is falling out in clumps" [1.4k upvotes]
"Lost 40 lbs, feel amazing, life changed" [947 upvotes]
// 4 posts. 4 different realities.
- type: code
id: drift-tiktok
title: "Source 4: TikTok (4M views)"
code: |
@healthinfluencer:
"Ozempic gave me stomach paralysis.
I was in the ER for 3 days."
4.2M views | 340K likes | 12K comments
// One person's experience.
// Presented as universal truth.
// Engagement = visibility, not validity.
- type: code
id: drift-nejm
title: "Source 5: NEJM meta-analysis"
code: |
// Pooled analysis, n = 14,847
// Design: randomized controlled trials
Result: "No statistically significant increase
in gastroparesis incidence vs placebo"
// p = 0.23, CI crosses 1.0
// The gold standard says: no signal.
- type: code
id: drift-faers
title: "Source 6: FDA Adverse Event Reports"
code: |
FAERS query: semaglutide + gastroparesis
Total reports: 8,547
Serious: 3,201
Hospitalizations: 1,894
Trend: increasing (2022-2024)
// Self-reported + unverified.
// But 8,547 reports is a signal.
- type: hook
id: drift-question
line: "Seven sources. Seven answers."
subline: "You make your decision based on whichever one you saw last."
# ============================================
# THE SPIRAL
# ============================================
- type: code
id: spiral
title: "The same problem, everywhere"
code: |
// Gastroparesis:
Doctor: "Rare"
FDA: (not on label)
Reddit: "It happened to me" (x 4,200)
TikTok: "It's an epidemic" (12M views)
NEJM: "No significant signal"
FAERS: 8,547 reports
// Hair loss:
Clinical trials: not studied
Reddit: 1,847 posts
Clinical evidence: zero
// Muscle loss:
Phase III: "~40% of weight lost is lean mass"
Reddit: "My legs are wasting away"
Trainers: "Just lift weights"
- type: hook
id: spiral-insight
line: "This is the vaccine problem."
subline: "Not misinformation. The absence of a system that can hold all claims and show you the shape of the evidence."
# ============================================
# THE CATASTROPHE
# ============================================
- type: code
id: catastrophe
title: "The Catastrophe"
code: |
// June 2023: She starts Semaglutide.
// Her research: doctor + Google + a few Reddit posts.
// Gastroparesis wasn't on the FDA label.
//
// January 2024: FDA updates the label.
// Intestinal obstruction warning added.
//
// Reddit had flagged this a year earlier.
// FAERS reports were accumulating for two years.
//
// Nobody told her. Google doesn't send updates.
// Her doctor's office doesn't track label changes.
// The truth changed. Her information didn't.
- type: code
id: catastrophe-pattern
title: "The pattern repeats"
code: |
// COVID vaccines, 2021:
// April: "No myocarditis signal"
// June: VAERS reports accumulating
// July: CDC acknowledges elevated risk in young males
//
// Millions of decisions made between April and July
// based on information that was about to change.
//
// Not because anyone lied.
// Because no system could show:
// "Here is what we know, at each level,
// and here is what changed since you last looked."
# ============================================
# THE FIX
# ============================================
- type: hook
id: fix-intro
line: "What if every source had a weight?"
subline: "And the disagreement was the answer."
- type: code
id: fix-tiers
title: "Source-class hierarchy"
code: |
// Not all sources are equal. Make it structural.
Tier 0: Regulatory action weight: 1.0 decay: never
Tier 1: RCTs, meta-analyses weight: 0.9 decay: 2 years
Tier 2: Observational studies weight: 0.7 decay: 1 year
Tier 3: Pharmacovigilance weight: 0.5 decay: 18 months
Tier 4: Clinician case reports weight: 0.4 decay: 6 months
Tier 5: Patient community weight: 0.2 decay: 3 months
Tier 6: Media, influencers weight: 0.1 decay: 30 days
// A million TikTok posts cannot outvote one FDA action.
// But they can signal that something is happening.
- type: code
id: fix-assert
title: "Store claims with provenance"
code: |
// Clinical evidence enters with full metadata
episteme.assert({
subject: "semaglutide/adverse-effects/gastroparesis",
predicate: "risk_level",
value: "No statistically significant increase",
source_class: "tier-1",
source: {
type: "meta-analysis",
journal: "NEJM",
sample_size: 14847
},
confidence: 0.92
});
// Patient report enters the same graph
episteme.assert({
subject: "semaglutide/adverse-effects/gastroparesis",
predicate: "risk_level",
value: "Experienced severe gastroparesis after 3 months",
source_class: "tier-5",
source: { platform: "reddit", upvotes: 847 },
confidence: 0.3
});
// Both coexist. Neither overwrites. But they are not equal.
- type: code
id: fix-query
title: "Query returns layers, not a single answer"
code: |
episteme.query({
subject: "semaglutide/adverse-effects/gastroparesis",
lens: "layered-consensus"
});
// Returns:
{
regulatory: "Added to label Jan 2024",
clinical_evidence: "No signal in Phase III (conflict: 0.34)",
pharmacovigilance: "8,547 FAERS reports, trend: increasing",
patient_community: "Widely reported, cluster size: 4,200",
overall_conflict: 0.72,
summary: "Trials show low incidence. Post-marketing and
patient reports show higher rates. FDA added
to label January 2024."
}
// Not "yes" or "no". The shape of the evidence.
# ============================================
# CLUSTER ESCALATION
# ============================================
- type: code
id: escalation
title: "Anecdotal signal detection"
code: |
// The Gardener monitors Tier 5 clusters.
// When density crosses threshold:
episteme.assert({
subject: "semaglutide/adverse-effects/hair-loss",
predicate: "escalation_signal",
value: "Anecdotal cluster detected",
source_class: "meta",
meta: {
tier_5_count: 1847,
growth_rate: "312/month",
tier_1_count: 0, // no clinical evidence exists
clinical_gap: true
},
lifecycle: "under-review"
});
// Does NOT claim hair loss is real.
// Claims: "people are reporting this, and nobody has studied it."
// The gap is the signal.
# ============================================
# GUIDANCE CHANGES
# ============================================
- type: code
id: guidance-change
title: "What changed since you last looked"
code: |
// FDA updates the label. Epoch shifts.
episteme.epoch.supersede({
old_epoch: "semaglutide-label-pre-2024",
new_epoch: "semaglutide-label-2024-01",
reason: "Intestinal obstruction warning added"
});
// Consumer returns 3 months later:
episteme.query({
subject: "semaglutide/adverse-effects",
lens: "layered-consensus",
since: "2023-10-01" // their last visit
});
// Returns:
{
changes: [{
date: "2024-01-12",
type: "regulatory",
change: "Intestinal obstruction added to warnings"
}],
prior_assertions_affected: 12
}
// Not just today's answer. What changed.
# ============================================
# TIME TRAVEL
# ============================================
- type: code
id: time-travel
title: "What was known when you decided?"
code: |
// "I started Semaglutide in June 2023.
// What were the known risks at that time?"
episteme.query({
subject: "semaglutide/adverse-effects",
lens: "layered-consensus",
as_of: "2023-06-15"
});
// Returns the June 2023 snapshot:
{
regulatory: "Boxed warning: thyroid. No GI obstruction.",
clinical: "Nausea common, no gastroparesis signal",
patient: "Growing reports (cluster size: 340)",
escalation: "not yet triggered (threshold: 500)"
}
// Your decision was reasonable given available evidence.
// The record proves it.
# ============================================
# DISAGREEMENT DASHBOARD
# ============================================
- type: code
id: disagreement
title: "The disagreement dashboard"
code: |
episteme.query({
subject: "semaglutide",
lens: "skeptic",
scope: "adverse-effects"
});
// Returns:
resolved: [
{ topic: "nausea", conflict: 0.08, "all tiers agree" }
]
active_disagreement: [
{ topic: "gastroparesis", conflict: 0.72,
clinical: "Low incidence",
faers: "8,547 reports",
patients: "Widely reported" }
]
emerging_signal: [
{ topic: "hair loss",
clinical_evidence: "none",
patient_reports: 1847,
status: "under-review" }
]
// Settled. Contested. Emerging.
// Honest answers, not false certainty.
# ============================================
# VISION
# ============================================
- type: vision
id: vision
title: "Episteme"
points:
- "Source-class hierarchy. Not all claims are equal."
- "Anecdotal signals surfaced without false authority."
- "Guidance changes propagated, not buried."
- "Time travel to the evidence at any moment."
tagline: "Git for Truth"