devops/analytics

analytics Shipped

What this lens looks for

Every significant user action goes through an AnalyticsProvider interface exposing track(event, properties), not a call wired straight to a concrete vendor; flag any direct coupling to an analytics backend (Mixpanel, Amplitude, PostHog and the like) in business or UI code; a logging-only default implementation must exist so analytics works before any backend is swapped in, and that default is the platform-idiomatic logger — os.log behind a protocol on Swift, a Timber-backed implementation behind an interface on Kotlin, a console-backed implementation behind a TypeScript interface, an ILogger-backed implementation behind an interface on C# — never a hard dependency on the vendor SDK; the abstraction is the same shape across platforms (interface/protocol plus a logging default); and each spec should declare its tracked events in a dedicated Analytics section.

What its verifier checks

Significant user actions are tracked through the AnalyticsProvider interface with track(event, properties) at call sites, not a concrete backend; no direct imports of or calls to Mixpanel/Amplitude/PostHog (or any analytics SDK) appear in business or UI logic; a logging-only default implementation is present and backed by the platform-idiomatic logger (os.log on Swift, Timber on Kotlin, console on TypeScript, ILogger on C#); the analytics abstraction is interface/protocol-based on every platform with no hard vendor coupling; and the spec defines its events in an Analytics section.