-
Notifications
You must be signed in to change notification settings - Fork 1
Development
Maxime Gauthier edited this page Apr 30, 2026
·
1 revision
From the bot directory:
gem install bundler -v 2.4.5
bundle installInstall optional groups as needed:
bundle config set --local with redis
bundle config set --local with postgres
bundle config set --local with telemetry
bundle installbundle exec ruby bot.rbbundle exec rspec
bundle exec rubocopThe default specs stub AI providers and optional databases, so they do not require external API calls.
-
bot.rb: process entrypoint -
environment.rb: environment parsing and validation -
lib/application.rb: shared application object -
lib/plugin_registry.rb: plugin discovery, dependency validation, and hook dispatch -
lib/plugins: built-in plugins -
lib/moderation: core moderation strategies and stores -
lib/harassment: harassment-domain runtime, classifiers, repositories, and reports -
docs/architecture.md: code architecture map -
docs/data-model.md: persistence and data model notes -
docs/adrs: architecture decision records
Plugins inherit from OpenModBot::Plugin.
The boot hook receives shared runtime context as keyword arguments:
app:bot:plugin_registry:
Plugins should require only the keyword arguments they need. Runtime hooks are isolated after boot so one plugin hook failure does not stop unrelated processing.