discover-event-surfaces
Analyze code changes and discover what analytics events should be tracked.
Input
Consumes change_brief YAML from diff-intake.
What it does
- Reviews each changed file
- Identifies user-facing interactions
- Maps interactions to trackable events
- Assigns priority (1=nice-to-have, 2=recommended, 3=critical)
- Suggests event names and properties
Output Format
event_candidates:
- event_name: Payment Method Selected
priority: 3
trigger: User selects payment method in checkout
file: src/checkout/PaymentForm.tsx
suggested_properties:
- payment_method
- checkout_step
Usage
Invoked by add-analytics-instrumentation as Step 2.
Downstream: instrument-events consumes this YAML.