- Replace custom daemonLogger with slog-based structured logging - Add --log-level flag (debug, info, warn, error) with default "info" - Add --log-json flag for JSON-formatted log output - Update log calls to use appropriate levels (Error, Warn, Info, Debug) - Add test helper functions (newTestLogger, newTestLoggerWithWriter) Log output examples: Text: time=2025-12-23T12:30:00Z level=INFO msg="daemon started" socket=/tmp/bd.sock JSON: {"time":"...","level":"INFO","msg":"daemon started","socket":"/tmp/bd.sock"} 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Max size: 10MB → 50MB per file - Max backups: 3 → 7 files - Max age: 7 → 30 days - Updated tests and documentation Resolves bd-t7ds 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Split 1567-line daemon.go into 5 focused modules - daemon_config.go (122 lines): config/path resolution - daemon_lifecycle.go (451 lines): start/stop/status/health/metrics - daemon_sync.go (510 lines): export/import/sync logic - daemon_server.go (115 lines): RPC server setup - daemon_logger.go (43 lines): logging utilities - Reduced main daemon.go to 389 lines (75% reduction) - All tests pass, improved code organization Amp-Thread-ID: https://ampcode.com/threads/T-7504c501-f962-4b82-a6d9-8e33f547757d Co-authored-by: Amp <amp@ampcode.com>