Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ When the user makes a request, identify which agent should handle it, read its S
|---|---|---|
| Create a dashboard, build a dashboard, set up analytics for a feature | **Dashboard Builder** | `agents/dashboard-builder/SKILL.md` |
| Create a Linear issue, track work in Linear, file a bug/task | **Linear Issue Manager** | `agents/linear/SKILL.md` |
| Validate data quality, check for NULLs/gaps/invalid values, verify schema | **Data Validation** | `agents/data-validation/SKILL.md` |
| Find events for a feature, explain event meaning, search event registry | **Context Helper (Events)** | `agents/context-helper/SKILL.md` |
| Create presentation, turn findings into slides, format for stakeholders | **Presentation** | `agents/presentation/SKILL.md` |
| Track feature release, analyze launch performance, monitor adoption | **Release** | `agents/release/SKILL.md` |
| Segment users, create personas, analyze user journeys, identify churn patterns | **User Research** | `agents/user-research/SKILL.md` |

If the request doesn't clearly match an agent, ask the user which they need.

Expand Down
86 changes: 81 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ agents/ ← One folder per agent
templates/dashboard-spec.md ← Phase 2 output template
linear/ ← Creates and manages Linear issues for analytics work
SKILL.md ← 4-phase flow: Gather β†’ Confirm β†’ Create β†’ Report
monitoring/ ← (Planned) Anomaly detection and alerts
enterprise-reporter/ ← (Planned) Enterprise account reports
prompt-reviewer/ ← (Planned) Prompt quality review
data-validation/SKILL.md ← Validates data quality and detects issues
context-helper/SKILL.md ← Finds and explains events from registry
presentation/SKILL.md ← Creates presentation decks from findings
release/SKILL.md ← Tracks and analyzes feature releases
user-research/SKILL.md ← Conducts quantitative user research
```

## How It Works
Expand Down Expand Up @@ -180,10 +182,84 @@ Creates feature dashboards in Hex Threads with a 4-phase workflow:

See `agents/dashboard-builder/SKILL.md` for full workflow.

### Data Validation

**Status:** NEW | **Trigger:** "Validate data quality", "Check for NULLs/gaps", "Verify schema"

Validates data quality in BigQuery tables and query results. Detects issues before they affect analysis.

**What it validates:**
- NULL checks, date gaps, invalid values
- Schema validation, row count checks
- Duplicates, referential integrity
- Business logic violations

See `agents/data-validation/SKILL.md` for full workflow.

### Context Helper (Events)

**Status:** NEW | **Trigger:** "What events does [feature] track?", "Explain event [name]"

Helps find and explain events for analytics work. Searches event registry, code, and Figma.

**What it provides:**
- Event discovery by feature or keyword
- Event definitions and context
- SQL usage examples
- Related events and flows

See `agents/context-helper/SKILL.md` for full workflow.

### Presentation

**Status:** NEW | **Trigger:** "Create presentation", "Turn findings into slides"

Creates presentation decks and slides from analytics findings for stakeholder presentations.

**What it creates:**
- Executive decks, QBR presentations
- Feature analysis, experiment results
- Strategy reviews, board updates
- Formatted with visuals and narratives

See `agents/presentation/SKILL.md` for full workflow.

### Release

**Status:** NEW | **Trigger:** "Track [feature] release", "Analyze launch performance"

Tracks and analyzes feature releases and product launches. Monitors adoption and impact.

**What it tracks:**
- Adoption metrics (DAU, penetration rate)
- User segments and cohort analysis
- Retention impact, engagement lift
- Performance vs goals

See `agents/release/SKILL.md` for full workflow.

### User Research

**Status:** NEW | **Trigger:** "Segment users", "Create personas", "User journey analysis"

Conducts quantitative user research using behavioral data. Identifies segments and opportunities.

**What it provides:**
- User segmentation and personas
- User journeys and pain points
- Power user patterns
- Churn signals and predictions

See `agents/user-research/SKILL.md` for full workflow.

---

| Agent | Status | What it does |
|-------|--------|-------------|
| Dashboard Builder | WIP | Creates feature dashboards in Hex Threads |
| Linear Issue Manager | Ready | Creates and manages Linear issues for analytics work across PA teams |
| Dashboard Builder | WIP | Creates feature dashboards in Hex Threads with automated data quality validation |
| Linear Issue Manager | Ready | Creates and manages Linear issues for analytics work across PA teams |
| Data Validation | NEW | Validates data quality, detects NULLs/gaps/invalid values with severity classification |
| Context Helper (Events) | NEW | Finds and explains events from registry, code, and Figma with SQL examples |
| Presentation | NEW | Creates presentation decks from analytics findings for stakeholder reviews |
| Release | NEW | Tracks feature releases, monitors adoption, analyzes performance vs goals |
| User Research | NEW | Conducts quantitative user research, creates personas, identifies opportunities |
231 changes: 231 additions & 0 deletions agents/context-helper/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,231 @@
---
name: context-helper-events
description: Helps find and explain events for analytics work. Searches event registry, code, and Figma to provide complete context about feature events.
tags: [context, events, discovery, search]
---

# Context Helper (Events)

## When to use

- "What events does [feature] track?"
- "Find events for [feature]"
- "Explain event [event_name]"
- "What does this event mean?"
- "Search for events related to [keyword]"
- "Which events should I use for [analysis]?"

## What it provides

- **Event discovery**: Find all events for a feature or keyword
- **Event definitions**: Explain what each event tracks and when it fires
- **Event context**: When/where event is triggered in the product
- **Usage examples**: SQL patterns for using the event
- **Data availability**: Which tables contain the event
- **Event metadata**: Type (exploration, generation), source (web, backend), status (active, deprecated)

## Steps

### 1. Understand User Request

Identify what the user needs:
- **Feature name**: "What events track video generation?"
- **Event name**: "Explain event 'generate_video'"
- **Use case**: "Events for retention analysis"
- **Keyword**: "Events with 'download' in the name"

### 2. Search Event Registry

Read `shared/event-registry.yaml` to find matching events:

**Search strategies:**
- **By feature**: Look in feature sections (e.g., "Video Generation", "Timeline")
- **By event name**: Search for exact or partial match
- **By keyword**: Search descriptions for keywords (download, click, generate)
- **By type**: Filter by event type (exploration, generation, navigation)

### 3. Check Additional Sources

If event not in registry or needs more context:

**Code search (GitHub):**
```bash
# Search for event tracking calls
gh api search/code -q "generate_video"
```

**Figma designs:**
- Look for feature flows showing when events fire
- Identify user interactions that trigger events

**Documentation:**
- Check product spec docs for feature details
- Review engineering docs for event implementation

### 4. Gather Event Details

For each matching event, collect:
- **Event name**: Exact string used in tracking
- **Description**: What the event tracks
- **Type**: exploration, generation, navigation, action
- **Source**: web, backend, api
- **When triggered**: User action or system event that fires it
- **Available in**: Which tables (ltxstudio_user_all_actions, etc.)
- **Key fields**: Important columns to use (action_name, action_category, model_gen_type)
- **Status**: active, deprecated, planned
- **Related events**: Other events in the same flow

### 5. Provide Usage Context

Show how to use the event in analysis:

**SQL example:**
```sql
-- Count video generations
SELECT COUNT(*) AS video_generations
FROM `ltx-dwh-prod-processed.web.ltxstudio_user_all_actions`
WHERE action_name = 'generate_video'
AND action_category = 'generations' -- IMPORTANT: Exclude clicks
AND date(action_ts) >= DATE_SUB(CURRENT_DATE(), INTERVAL 7 DAY)
```

**Common patterns:**
- **DAU**: `COUNT(DISTINCT lt_id)` for event
- **Event count**: `COUNT(*)` or `COUNT(CASE WHEN ... THEN 1 END)`
- **Funnel analysis**: Multiple events in sequence
- **Segmentation**: Break down by `griffin_tier_name_at_action`

### 6. Format Response

**Structure:**
```
# Events for [Feature/Keyword]

## Found Events: [X]

### 1. [event_name]
- **Description**: [What it tracks]
- **Type**: [exploration/generation/navigation]
- **Source**: [web/backend/api]
- **When triggered**: [User action that fires event]
- **Available in**: `ltxstudio_user_all_actions`
- **Status**: βœ… Active / ⚠️ Deprecated / πŸ”¨ Planned

**Key filters:**
- `action_name = 'event_name'`
- `action_category = 'category'` [if applicable]

**SQL Example:**
```sql
SELECT COUNT(*) AS event_count
FROM `ltx-dwh-prod-processed.web.ltxstudio_user_all_actions`
WHERE action_name = 'event_name'
AND date(action_ts) >= DATE_SUB(CURRENT_DATE(), INTERVAL 7 DAY)
```

**Related events:**
- [related_event_1]: [description]
- [related_event_2]: [description]

### 2. [next_event_name]
[Same structure...]

## Usage Notes

**Critical filters:**
- For video generations: Must use `action_category = 'generations'` to exclude clicks
- For downloads: Use `action_name = 'download_image'` or `download_video`
- For generations: Check `model_gen_type` for sub-types (t2i, i2i, t2v, i2v, v2v)

**Common patterns:**
- **Feature DAU**: Users who performed this event
- **Event funnel**: Sequence from exploration β†’ generation β†’ download
- **Adoption rate**: % of DAU who used this event

## Recommendations

For your analysis, consider:
1. [Specific event recommendation 1]
2. [Specific event recommendation 2]
3. [Warning or gotcha to avoid]
```

### 7. Proactive Suggestions

**If user asks for feature events:**
- List ALL events for that feature (exploration, generation, navigation)
- Show typical event flow (what happens first, second, etc.)
- Warn about gotchas (e.g., must filter action_category for video gen)

**If user asks for event explanation:**
- Provide full context (when/why it fires)
- Show related events (what comes before/after)
- Include SQL examples for common use cases

**If events not found:**
- Suggest similar events that might work
- Offer to search code/Figma for new events
- Create placeholder in event registry if needed

## Reference Files

| File | Read when |
|------|-----------|
| `shared/event-registry.yaml` | Always β€” primary source of truth for events |
| `shared/bq-schema.md` | Table structures and column details |
| `shared/metric-standards.md` | SQL patterns for event-based metrics |

## Rules

### Search Best Practices

- **DO** always check `shared/event-registry.yaml` first
- **DO** search by feature name, event name, and keywords
- **DO** use GitHub code search if event not in registry
- **DO** check Figma for feature flows and user interactions
- **DO** verify event exists in actual data before recommending it

### Event Documentation

- **DO** explain what triggers the event (user action or system event)
- **DO** specify which table(s) contain the event
- **DO** include critical filters (action_category, model_gen_type)
- **DO** provide SQL examples for common use cases
- **DO** list related events in the same flow
- **DO** warn about gotchas (e.g., "must filter action_category")

### Response Format

- **DO** lead with summary: "Found X events for [feature]"
- **DO** organize by event type (exploration, generation, navigation)
- **DO** include status indicators (βœ… Active / ⚠️ Deprecated)
- **DO** provide "Usage Notes" section with critical filters
- **DO** include "Recommendations" for specific analysis needs
- **DO NOT** invent events β€” only report events that exist
- **DO NOT** skip related events β€” show full context

## Common Event Searches

### By Feature:
- "Video generation events" β†’ All events for video gen (generate_video, model_gen_type filters, etc.)
- "Timeline events" β†’ Split clip, delete clip, update clip, link timeline
- "Storyboard events" β†’ entered_storyboard, generate_storyboard, etc.

### By Use Case:
- "Retention analysis" β†’ Core engagement events (generate_image, generate_video, download)
- "Funnel analysis" β†’ Sequential events (storyboard β†’ generate β†’ download)
- "Adoption analysis" β†’ New feature events with status=active

### By Type:
- "Generation events" β†’ action_category = 'generations'
- "Navigation events" β†’ event_source like '%navigation%'
- "Feature usage" β†’ exploration category events

## Event Discovery Workflow

1. **Start with registry**: Check `shared/event-registry.yaml`
2. **Code search**: If not in registry, search GitHub
3. **Figma check**: Verify with product design flows
4. **Data verification**: Query to confirm event exists in tables
5. **Document findings**: Add to registry if new event found
6. **Share context**: Provide full details to user with examples
Loading