The Phase 3 roadmap specified ClickHouse + NATS event streaming for analytics. Instead, STRATT uses a JSONL file (~/.stratt/events.jsonl) with configurable sinks. Same query patterns (filter by event/domain/timestamp, aggregate by type), zero infrastructure. The webhook sink (STRATT_EVENT_SINK=webhook) provides the integration point — point it at a ClickHouse HTTP endpoint when ready.
Key learning: For CLI-first tools, the analytics data format matters more than the storage backend. JSONL gives you: append-only writes (no locks), line-by-line streaming reads, trivial parsing in any language, and grep as a query engine for debugging. When you outgrow it, the migration to ClickHouse is a sink change — the event schema stays identical.
Applicable pattern: Start with the simplest storage that supports your query patterns. For event streams: JSONL files → SQLite → ClickHouse. Each transition preserves the event schema and adds only the storage layer. The events library (emit(), queryEvents(), computeAnalytics()) never changes — only the sink implementation does.