Commit Graph

2 Commits

Author SHA1 Message Date
Claude Discord Bot
b2ff6f19f2 Implement CRIT-006: Config system with YAML validation
- 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>
2026-02-13 18:01:49 +00:00
Claude Discord Bot
6b56463779 Initial commit: Core infrastructure (CRIT-001 through CRIT-005)
Implemented foundational modules for Claude Discord Coordinator:

- Project skeleton with uv (CRIT-003)
- Claude CLI subprocess runner with 11/11 tests passing (CRIT-004)
- SQLite session manager with 27/27 tests passing (CRIT-005)
- Comprehensive test suites for both modules
- Production-ready async/await patterns
- Full type hints and documentation

Technical highlights:
- Validated CLI pattern: claude -p --resume --output-format json
- bypassPermissions requires non-root user (discord-bot)
- WAL mode SQLite for concurrency
- asyncio.Lock for thread safety
- Context manager support

Progress: 5/18 tasks complete (28%)
Week 1: 5/6 complete

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 17:55:03 +00:00