Go to file
Claude Discord Bot e6983b56b9 Week 3 progress: Logging and testing complete (MED-001, MED-002, MED-005)
MED-001: Enhanced typing indicator
- Persistent typing loop (_maintain_typing method)
- Loops every 8s to maintain indicator for long operations (30s-5min)
- 8 comprehensive tests covering all lifecycle scenarios
- 27/27 bot tests passing

MED-002: Structured logging and error reporting
- logging_config.py (371 lines) - JSONFormatter, ErrorTracker, format_error_for_discord
- RotatingFileHandler (10MB max, 5 backups)
- Unique 8-char error IDs for support tracking
- Privacy-safe Discord error messages (7 error types)
- Enhanced bot.py with structured logging throughout
- 15/15 logging tests passing

MED-005: Comprehensive test suite
- Total: 156/157 tests passing (99.4%)
- test_session_manager.py: 27 tests
- test_claude_runner.py: 11 tests
- test_config.py: 25 tests
- test_response_formatter.py: 26 tests
- test_bot.py: 27 tests
- test_commands.py: 18 tests
- test_concurrency.py: 7 tests
- test_logging.py: 15 tests

Total: 13/18 tasks complete (72.2%)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 19:12:04 +00:00
claude_coordinator Week 3 progress: Logging and testing complete (MED-001, MED-002, MED-005) 2026-02-13 19:12:04 +00:00
docs Week 3 progress: Logging and testing complete (MED-001, MED-002, MED-005) 2026-02-13 19:12:04 +00:00
examples Initial commit: Core infrastructure (CRIT-001 through CRIT-005) 2026-02-13 17:55:03 +00:00
tests Week 3 progress: Logging and testing complete (MED-001, MED-002, MED-005) 2026-02-13 19:12:04 +00:00
.gitignore Initial commit: Core infrastructure (CRIT-001 through CRIT-005) 2026-02-13 17:55:03 +00:00
.python-version Initial commit: Core infrastructure (CRIT-001 through CRIT-005) 2026-02-13 17:55:03 +00:00
BOT_USAGE.md Week 2 complete: Discord bot MVP with full integration 2026-02-13 18:42:50 +00:00
config.example.yaml Implement CRIT-006: Config system with YAML validation 2026-02-13 18:01:49 +00:00
CRIT-004_IMPLEMENTATION.md Initial commit: Core infrastructure (CRIT-001 through CRIT-005) 2026-02-13 17:55:03 +00:00
DEPLOYMENT_CHECKLIST.md Week 3 progress: Logging and testing complete (MED-001, MED-002, MED-005) 2026-02-13 19:12:04 +00:00
HIGH-003_IMPLEMENTATION.md Week 2 complete: Discord bot MVP with full integration 2026-02-13 18:42:50 +00:00
HIGH-004_IMPLEMENTATION.md Week 2 complete: Discord bot MVP with full integration 2026-02-13 18:42:50 +00:00
main.py Initial commit: Core infrastructure (CRIT-001 through CRIT-005) 2026-02-13 17:55:03 +00:00
MED-002_IMPLEMENTATION.md Week 3 progress: Logging and testing complete (MED-001, MED-002, MED-005) 2026-02-13 19:12:04 +00:00
pyproject.toml Initial commit: Core infrastructure (CRIT-001 through CRIT-005) 2026-02-13 17:55:03 +00:00
pytest.ini Initial commit: Core infrastructure (CRIT-001 through CRIT-005) 2026-02-13 17:55:03 +00:00
README.md Initial commit: Core infrastructure (CRIT-001 through CRIT-005) 2026-02-13 17:55:03 +00:00
test_logging_manual.py Week 3 progress: Logging and testing complete (MED-001, MED-002, MED-005) 2026-02-13 19:12:04 +00:00

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