Inspiration

While researching mod workflows, I discovered that moderators manually add usernames to AutoMod YAML rules to filter users they don't trust — then manually remove them later when the user reforms. There's no native Reddit tool that does this dynamically. AutoSentinel was built to automate exactly that workflow.

The idea was validated by real moderators in the Devvit Discord who confirmed they maintain manual username lists in AutoMod and would immediately install a tool that handled this automatically. One moderator specifically requested a "clean slate" system that lifts restrictions after a configurable number of approved posts — which became a core feature.

What it does

AutoSentinel monitors user behavior across reports and mod actions. When a user accumulates enough risk signals, they automatically enter Scrutiny Mode — their future posts are filtered to the modqueue for review.

The key differentiator is the clean slate system: after a mod approves X consecutive posts from a scrutinized user, scrutiny lifts automatically and their risk score resets. Users who reform are rewarded. Users who continue breaking rules escalate to a permanent watchlist.

Mods receive modmail notifications at every stage and can manually override any AutoSentinel decision via right-click menu items on any post.

How we built it

Built entirely on Reddit's Devvit platform using TypeScript, Hono, and Redis for state persistence. The architecture follows a strict separation of concerns:

  • riskScorer.ts — pure functions with zero side effects, fully unit tested
  • store.ts — all Redis operations centralized in one module
  • triggers.ts — event handlers for onPostReport, onCommentReport, onPostSubmit, onCommentSubmit, onModAction
  • menu.ts — mod-only manual override controls
  • forms.ts — mod configuration panel

All thresholds are configurable — scrutiny threshold, watchlist threshold, clean slate approval count, and what action to take (alert only, filter, or filter and notify). No hardcoded values.

Challenges we ran into

The biggest challenge was understanding the Devvit web platform's (@devvit/start) differences from the classic Devvit SDK. Several APIs that are documented for the classic SDK work differently or have different import paths in the web platform — including Redis, the Reddit client, and modmail. Each required digging into the type definitions directly to find the correct method signatures.

Reddit's spam filter also presented a testing challenge — new account posts are removed by Reddit's filters before triggers fire in a test environment. Working with the Devvit team confirmed that onPostSubmit fires before Reddit's safety checks in production, which resolved the concern.

Accomplishments that we're proud of

The clean slate system — scrutiny that heals itself. Most moderation tools only escalate. AutoSentinel is one of the few that de-escalates automatically. When a scrutinized user earns enough consecutive mod approvals, their restrictions lift and their score resets — no manual intervention needed. This required careful state management across multiple async trigger events and was the most technically satisfying part of the build.

A genuinely novel mechanic on Devvit. The dynamic scrutiny system does not exist in any native Reddit tool or existing Devvit app. AutoModerator cannot react to a user's history dynamically. AutoSentinel does.

Clean, testable architecture. Every module is independently testable. The risk scorer is a pure function with 11 unit tests. The store layer has 6 unit tests. All business logic is separated from side effects. This made debugging significantly easier and the codebase more maintainable.

Fully configurable for any subreddit. No two subreddits are the same. Every threshold, every action, every behavior in AutoSentinel is configurable. Mods who want aggressive filtering get it. Mods who want alert-only visibility get that too.

What we learned

Building deterministic moderation tools requires extreme care around explainability. Every AutoSentinel action has a clear, logged reason. Mods need to trust the tool — and trust requires transparency. The decision to avoid AI/ML entirely and use only deterministic rule-based scoring was the right call for this use case.

What's next for AutoSentinel

Cross-subreddit opt-in network. Related subreddits can share risk signals — when a user is watchlisted in one participating sub, other opted-in subs receive an alert. Built on Devvit's global Redis scope.

User appeal system. A structured way for users to appeal their scrutiny status directly to the mod team via modmail with full risk context attached.

Analytics dashboard. A moderator-facing custom post showing violation trends over time, most common risk signals, and whether the subreddit's overall risk profile is improving week over week.

Built With

Share this project:

Updates