# Code Review Plan (6-Part Pass) ## Scope Review the repository in six focused passes to cover entrypoints, transport layers, core logic, config, docs, and infrastructure. ## Plan 1. **CLI entrypoints** - Paths: `cmd/musiclink/`, `cmd/smoketest/` - Focus: startup flow, flags, shutdown handling, error propagation. 2. **Bot transport layers** - Paths: `internal/bot/`, `internal/matrixbot/` - Focus: protocol handling, reconnection, rate limits, threading/room routing, dedupe, and resource cleanup. 3. **Message handling & link detection** - Paths: `internal/detector/`, `internal/resolver/`, `internal/services/` - Focus: parsing correctness, error handling, API usage, formatting logic. 4. **Config & runtime wiring** - Paths: `pkg/config/`, `config.example.toml`, `config.toml` - Focus: validation, defaults, secrets handling, backwards compatibility. 5. **Docs & design artifacts** - Paths: `docs/`, `README.md`, `WORKLOG.md` - Focus: accuracy vs implementation, user-facing setup guidance. 6. **Project/infra metadata** - Paths: `go.mod`, `go.sum`, `flake.nix`, `flake.lock`, `LICENSE` - Focus: dependency hygiene, tooling assumptions, licensing.