Inspiration Most moderation tools answer: "What happened?" Thread Oracle answers: "What is about to happen?" Reddit moderators are constantly reactive — by the time a thread needs locking, the pile-on has already happened, good-faith users have left, and the mod queue is flooded. I wanted to build something that reads the energy of a thread like a weather station reads atmospheric pressure — detecting the conditions for a storm before the storm arrives. The Oracle framing felt native to Reddit's culture: something ancient and knowing, that speaks in prophecy, that watches without being asked.

What it does Thread Oracle is a Reddit-native moderation intelligence system that predicts thread escalation before moderators are forced to intervene. Any user can Summon the Oracle from the post context menu. This creates a linked Oracle dashboard post and pins a comment on the original thread. From that point, the Oracle watches silently. The chaos detection engine tracks 8 signals in real time: SignalWhat it catchesComment velocitySudden engagement spikesConflict keywords"cope", "ratio", "wrong", "you people"Sarcasm density"/s", "cool story", "big brain", "wow thanks"Caps & punctuation rageTyped-in-anger patternsDogpile detectionSame users mass-replying to one targetRepeat offender presenceCross-thread high-friction usersShort dismissive replies"lol", "k", "sure buddy" clustersMod historyPrior removals and ban status These signals combine into a Chaos Score (0–100) and Risk Level (LOW / MEDIUM / HIGH / CRITICAL). When chaos crosses a meaningful threshold, the app calls an AI backend to generate: A Public Prophecy — thematic, in-universe, Reddit-flavored prediction of where the thread is heading A Private Mod Warning — specific, actionable guidance for the moderator Moderators see: full chaos score, risk badge, verdict, User Radar (flagged users with removal history), private warning, and action buttons (Consult Oracle, Enable Slow Mode, Lock Thread). Regular users see: chaos score, risk badge, comment count, and the public prophecy only.

How we built it The architecture is a clean separation of concerns: Reddit comments → Devvit app (chaos scoring + UI) → Groq proxy (AI) → Dashboard Devvit app (src/core/oracle.ts): Pure TypeScript running on Reddit's infrastructure. Handles all comment ingestion, chaos math, Redis state management, and UI rendering via Devvit Blocks. No AI provider is called directly from here. Groq proxy (Node.js + Hono on Render): Receives a structured payload — post title, recent comment snippets, chaos score, risk level — and returns prophecy, mod warning, verdict, aggression score, and sarcasm score. One request, one response. Redis backs all state: chaos scores, timestamps, user radar data, verdict cache, cooldown locks, and duplicate-summon prevention. The dashboard hydrates instantly on any reload from cache — no AI call needed just to render. Stability engineering to prevent request storms:

Per-thread in-flight locks (90 second timeout) Per-thread AI cooldown (2 min auto, 30 sec manual) 30-second debounce on comment triggers Meaningful-change gating: only fires AI if risk tier changed, chaos delta ≥ 15, or mod manually requested Duplicate summon prevention — one Oracle per thread

Challenges we ran into The biggest challenge was Devvit's HTTP domain allowlist. Every external domain the app calls must be explicitly approved by Reddit's platform team — and this approval is asynchronous with no guaranteed SLA. The journey:

Direct Groq calls from Devvit → domain blocked by allowlist Switched to Gemini → rate limits too restrictive for a live app Built and deployed a proxy to Render → proxy domain also pending allowlist approval at submission time

The irony is the app's AI logic is fully built, deployed, and working. The domain approval process introduced a hard external dependency that sat outside our control during the final hours of the hackathon. The chaos scoring system also required careful tuning. Raw comment counts mislead — a 50-comment thread with slow velocity and neutral language is healthier than a 10-comment thread with three people dogpiling one user. Getting the weighted formula right took significant iteration.

Accomplishments that we're proud of

The chaos scoring system works entirely without AI — the risk assessment is meaningful and accurate on its own. The AI layer adds prophecy and color, but the core product stands independently. The dashboard communicates risk intuitively at a glance: the color-coded chaos bar, the risk badge, the thematic prophecy text all read without explanation. The request storm prevention system is robust. In testing, even rapidly-commenting threads never triggered duplicate AI calls or race conditions. The "Oracle" framing turns a dry moderation tool into something with genuine Reddit personality.

What we learned

Devvit's execution model requires rethinking state management from scratch. Redis is your memory, everything is event-driven, and there's no persistent server process — just handler invocations. External API dependencies in Devvit apps are a first-class architectural concern. The domain allowlist process needs to be started days before a deadline, not hours. Reddit threads have surprisingly consistent chaos signatures. Certain keyword clusters alongside all-caps and short replies are nearly always precursors to escalation — the signal is real.

What's next for Thread Oracle

Subreddit-level analytics — aggregate chaos trends across all watched threads to surface which topics consistently escalate Raid detection — velocity spikes from new accounts as a distinct signal Auto-escalation actions — optional mode where the Oracle automatically enables slow mode at CRITICAL without waiting for mod input Historical prediction accuracy — track how often the Oracle's risk calls were correct Temporal escalation graphs — visual chaos timeline per thread

Built With

Share this project:

Updates