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