[Feature]: Chaos Oracle Protocol — Real-World Signals → Narrative Parameters#52
Open
[Feature]: Chaos Oracle Protocol — Real-World Signals → Narrative Parameters#52
Conversation
5 breakthrough innovations to make Voidborne a living, reactive narrative organism: 1. Narrative Consequence Ledger (NCL) - ConsequenceRecorder: parses choice outcomes → typed consequence vectors - ConsequenceLedger: persistent store with query/resolution API - NarrativeDebtEngine: NDS computation + auto-escalation of overdue debts - ClaudeContextBuilder: injects outstanding debts into Claude system prompt - ConsequenceBetMarket: 8x/4x/2x/1.5x betting on consequence resolution timing - LivingStoryOrchestrator: full lifecycle coordinator 2. Chaos Oracle Protocol (COP) - SignalFetcher: CoinGecko + social + on-chain + internal entropy - ChaosMapper: 5 signal types → narrative parameter changes - ChaosMarketEngine: 30-min prediction markets on chaos signals - ClaudeChaosInjector: formats signals as Claude prompt block - ChaosSignalArchive: historical signal↔chapter correlation tracking - ChaosOracleEngine: full pipeline orchestrator 3. Cross-Chain Prediction Bridge (CPB) — spec only - VoidborneSatellite.sol pattern for Arbitrum/Optimism/Ethereum - LayerZero cross-chain messaging architecture - 40M EVM users → Base canonical pool 4. Chapter Storyboard NFT Drops (CSND) — spec only - 4-panel AI illustration + Chapter Epitaph per chapter - 90-second Dutch auction (→), 12 NFTs per chapter - 24h early access + 1.15x multiplier for holders 5. Rival AI Dueling Engine (RADE) — spec only - 5 USDC entry → 150-word narrative brief challenge - Community vote pool (1 USDC/vote, 60 min) - Winner: 70% pool + Duel Victor NFT + lore canonization Revenue impact: $11.57M Year-5 from this cycle Cumulative: ~$91.80M Year-5 Files: INNOVATION_CYCLE_53_FEB_19_2026.md (full spec, 21KB) INNOVATION_CYCLE_53_SUMMARY.md (summary) INNOVATION_CYCLE_53_TWEET.md (social media content) packages/agent-sdk/src/consequence-ledger.ts (530+ lines POC) packages/agent-sdk/src/chaos-oracle.ts (420+ lines POC)
Innovation Cycle #53: 'The Living Story Protocol' Wires real-world market signals (BTC/ETH price, social volume, on-chain FORGE activity) into the Voidborne narrative engine. Creates daily refresh reason: 'BTC crashed 12% → House Valdris treasury panic in next chapter.' ## New Files ### API Routes - /api/chaos-oracle/signals: CoinGecko BTC/ETH + 3 synthetic signals mapped to Voidborne narrative parameters. 5-min cache, graceful fallback. - /api/chaos-oracle/chapter-context: Builds Claude system-prompt block for pre-chapter injection (chaos signals as in-world lore context). ### UI Components - ChaosOracleWidget: Sidebar widget showing 4 live signals with: - Expandable narrative detail rows - House beneficiary/burdened display - Intensity bars (framer-motion animated) - Auto-refresh every 5 minutes - ChaosOracleBanner: Compact dismissable top-of-chapter banner showing dominant signal (only renders for tense+ intensity) ### Pages - /chaos-oracle: Full dashboard page with prompt block preview, intensity context callout, how-it-works explainer, signal sources ### Integrations - story/[storyId]/page.tsx: Banner + widget wired into story layout - Navbar: Added 'Chaos Oracle' navigation link ## Tests - src/__tests__/chaos-oracle/signals.test.ts: Unit tests for priceDirection, BTC narrative mapping, chaos intensity, intensity clamping ## Quality - 0 TypeScript source errors (tsc --noEmit) - Next.js build succeeds cleanly - Mobile responsive (compact prop for tight sidebars) - Full error states + loading skeletons - 5-min cache headers on signals route
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the Chaos Oracle Protocol (COP) from Innovation Cycle #53: 'The Living Story Protocol'.
Real-world market signals — BTC/ETH price, social volume, on-chain $FORGE activity — are fetched and mapped to Voidborne narrative parameters before each chapter. The story literally reacts to market conditions, creating a daily refresh reason: 'BTC crashed 12% → House Valdris treasury panic in the next chapter.'
Changes
New: API Routes
/api/chaos-oracle/signals/api/chaos-oracle/chapter-contextNew: UI Components
ChaosOracleWidget(sidebar)ChaosOracleBanner(top-of-chapter)New: Pages
/chaos-oracle— Full dashboard with:Modified: Existing Pages
story/[storyId]/page.tsx— Wired in:ChaosOracleBannerabove chapter contentChaosOracleWidgetin sidebar below BettingInterfaceNavbar.tsx— Added 'Chaos Oracle' nav linkTests
src/__tests__/chaos-oracle/signals.test.ts— Unit tests for:priceDirection()all 5 direction thresholdsSignal → Narrative Architecture
Testing
tsc --noEmit)/api/chaos-oracle/signalsroute renders as static (○) in build output/chaos-oraclepage renders as static (○) in build outputScreenshots
Story Sidebar (ChaosOracleWidget)
Top-of-Chapter Banner (ChaosOracleBanner)
Deployment Notes
No environment variables required — CoinGecko free tier, no API key.
Social and on-chain signals currently simulated deterministically (hour-based seed). Wire real Twitter API + Alchemy in future cycle.
Cache-Control: public, s-maxage=300, stale-while-revalidate=60on signals route — Vercel Edge will cache correctly.Next Steps (Future Cycles)
Innovation Cycle #53 — Claw × Voidborne × February 19, 2026