feat: initial implementation
Asyncio IRC bot with decorator-based plugin system. Zero external dependencies, Python 3.11+. - IRC protocol: message parsing, formatting, async TCP/TLS connection - Plugin system: @command and @event decorators, file-based loading - Bot orchestrator: connect, dispatch, reconnect, nick recovery - CLI: argparse entry point with TOML config - Built-in plugins: ping, help, version, echo - 28 unit tests for parser and plugin system
This commit is contained in:
37
PROJECT.md
Normal file
37
PROJECT.md
Normal file
@@ -0,0 +1,37 @@
|
||||
# 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`
|
||||
Reference in New Issue
Block a user