# derp - Project ## Purpose A lightweight, zero-dependency asyncio IRC bot with a clean plugin system for Python 3.11+. ## Architecture ``` CLI (argparse) -> Config (TOML) -> Bot (orchestrator) |-> IRCConnection (async TCP/TLS) |-> PluginRegistry (decorators, loader) |-> plugins/*.py ``` ### Modules | Module | Role | |--------|------| | `cli.py` | Argument parsing, logging setup, entry point | | `config.py` | TOML loader with defaults merging | | `irc.py` | IRC protocol: message parsing, formatting, async connection | | `plugin.py` | Decorator-based plugin system with file loader | | `bot.py` | Orchestrator: connect, dispatch, reconnect | ### Key Design Decisions - **Zero dependencies**: stdlib only (`asyncio`, `ssl`, `tomllib`, `importlib`) - **Decorator-based plugins**: `@command` and `@event` for clean registration - **File-based plugin loading**: drop `.py` files in `plugins/` directory - **Async throughout**: all handlers are `async def` ## Dependencies - Python 3.11+ (for `tomllib`) - No external packages required at runtime - Dev: `pytest`, `ruff`