feat(cli): track init onboarding journeys
Merged
WC
3mo ago+468+468+012345678901234567890123456789-32-32-01234567890123456789
Summary
- add per-invocation run IDs and resumable journey IDs to classic
capgo init - persist resume lineage and enrich existing
onboarding-v2milestones plus lifecycle boundaries - preserve terminal replay, analytics opt-out, and the existing
markSnag/sendEventdelivery path
Scope
- classic
capgo initonly; nobuild init, frontend, backend, replay delivery, or generic prompt instrumentation changes - 460 additions and 30 deletions (490 total changed lines)
Test plan
-
bun run cli:check - focused init telemetry, replay, guardrail, and analytics suites
- CLI lint, typecheck, build, and final whole-change review
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.
Summary by CodeRabbit
-
New Features
- Added telemetry for CLI initialization, including milestones, resume and restart tracking, app scoping, and explicit completion, cancellation, or failure outcomes.
- Preserved telemetry metadata across resumed sessions and supported replay-session correlation.
- Added telemetry opt-out support; analytics failures do not interrupt initialization.
-
Documentation
- Added a design specification covering initialization telemetry identities, events, persistence, and opt-out behavior.
-
Tests
- Added comprehensive coverage for telemetry, progress handling, lifecycle events, and command integration.