- ProjectConfig dataclass for type-safe project settings - Channel-to-project mapping with required fields - Environment variable expansion ($HOME, custom vars) - System prompt loading from file or inline - Tool restriction per project - Model selection per project - Config class with comprehensive YAML loading - Default config: ~/.claude-coordinator/config.yaml - Full validation with detailed error messages - Duplicate channel ID detection - Project directory existence checks - Tool name validation (Bash, Read, Write, Edit, Glob, Grep, WebSearch, WebFetch) - Model validation (sonnet, opus, haiku) - System prompt file validation - Example config with all options documented - Full example with all fields - Minimal example with defaults - Environment variable usage - Read-only project example - Inline comments explaining all options - Comprehensive test suite: 25/25 tests passing - ProjectConfig creation and defaults - Environment variable expansion - System prompt loading (inline and file) - YAML loading and parsing - Required field validation - Duplicate channel ID detection - Invalid tool name detection - Missing directory warnings - Invalid model detection - Channel ID lookup - Numeric channel ID conversion Progress: 6/6 Week 1 tasks complete Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| claude_coordinator | ||
| examples | ||
| tests | ||
| .gitignore | ||
| .python-version | ||
| config.example.yaml | ||
| CRIT-004_IMPLEMENTATION.md | ||
| main.py | ||
| pyproject.toml | ||
| pytest.ini | ||
| README.md | ||
Claude Discord Coordinator
A Discord bot that provides multi-user access to Claude CLI sessions with persistence, configuration management, and formatted responses.
Features
- Multi-user sessions: Each Discord user gets their own persistent Claude CLI session
- Session persistence: Conversation history and working directories saved in SQLite
- YAML configuration: Flexible bot configuration with environment variable support
- Response formatting: Automatic chunking and code block formatting for Discord
- Subprocess management: Robust Claude CLI process handling with timeout control
Project Structure
claude-coordinator/
├── pyproject.toml # uv project configuration
├── README.md # This file
├── .gitignore # Python/uv ignore patterns
└── claude_coordinator/ # Main package
├── __init__.py # Package initialization
├── bot.py # Discord bot entry point
├── config.py # YAML configuration management
├── session_manager.py # SQLite session persistence
├── claude_runner.py # Claude CLI subprocess wrapper
└── response_formatter.py # Discord message formatting
Requirements
- Python 3.12+
- uv 0.10.2+
- Claude CLI (authenticated)
Dependencies
- discord.py 2.6.4+ - Discord bot framework
- aiosqlite 0.22.1+ - Async SQLite interface
- pyyaml 6.0.3+ - YAML configuration parsing
Installation
cd /opt/projects/claude-coordinator
uv sync
Configuration
Configuration will be loaded from a YAML file (to be implemented in CRIT-004).
Usage
# Run the bot (entry point to be completed)
uv run python -m claude_coordinator.bot
Development Status
This project is under active development. Current implementation status:
- CRIT-003: Project skeleton with uv
- CRIT-004: Configuration system
- CRIT-005: Session management
- CRIT-006: Claude CLI integration
- CRIT-007: Discord bot commands
- CRIT-008: Testing and deployment
License
TBD