# ADR-001: Go with Server + Mobile PWA Architecture ## Status Accepted ## Context Claudomator needs to capture tasks, dispatch them to Claude Code, and report results. The primary human interface is a mobile device requiring push notifications and frictionless input. ## Decision - **Language**: Go for the backend (CLI + API server) - **Architecture**: Pipeline with bounded executor pool (goroutines) - **API**: REST + WebSocket for real-time updates - **Storage**: SQLite + filesystem (logs, artifacts) - **Task format**: YAML definitions - **Mobile**: PWA with Web Push notifications (future phase) ## Rationale - Go: single binary, excellent process management (`os/exec`), natural concurrency - SQLite: zero-dependency, embeddable, queryable metadata - WebSocket: real-time progress streaming to mobile clients - REST: simple task creation from any HTTP client (mobile, curl, CI) ## Alternatives Considered - **TypeScript/Node.js**: Claude Code SDK exists, but runtime dependency hurts distribution - **Python**: Good async, but packaging/distribution is painful for CLI tools - **Rust**: Overkill for this problem domain; slower iteration speed ## Consequences - CGo dependency via `go-sqlite3` (requires C compiler for builds) - Mobile PWA to be built as a separate frontend phase - Claude Code invoked via CLI flags (`-p`, `--output-format stream-json`), not SDK