summaryrefslogtreecommitdiff
path: root/docs/adr/001-language-and-architecture.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/adr/001-language-and-architecture.md')
-rw-r--r--docs/adr/001-language-and-architecture.md32
1 files changed, 32 insertions, 0 deletions
diff --git a/docs/adr/001-language-and-architecture.md b/docs/adr/001-language-and-architecture.md
new file mode 100644
index 0000000..99022f1
--- /dev/null
+++ b/docs/adr/001-language-and-architecture.md
@@ -0,0 +1,32 @@
+# 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