# Metric tree

One page for a product lead, for Northwind Workspace (a constructed company). Each metric has one written definition, a
grain, the dbt model that builds it and the line of the ARR bridge it feeds. ARR itself is defined in
`ARR_DEFINITION.md`: contracted recurring ARR plus usage run-rate ARR. Free workspaces count 0 there, so every metric
above conversion is a leading indicator, never revenue.

## The tree

| Area | Metric | Definition | Grain | Built in | Feeds |
|---|---|---|---|---|---|
| Acquisition | Product sign-ups | workspaces that signed up and were not put on a sales-led contract within 28 days (those were created by a sales deal) | workspace, by sign-up month | `fct_workspace_lifecycle.product_signup`; monthly count in `fct_lifecycle_monthly.product_signups` | conversion |
| Activation | Activated | a run on at least 7 of the first 14 days after sign-up (day 0 is the sign-up day); a run is a free-day run or metered runs on a paid day. Chosen by evidence: `lifecycle-metrics.html` | workspace, known on day 14 | `fct_workspace_lifecycle.active_days_14` | conversion and 90-day paid retention |
| Adoption | Active weeks | weeks with at least one run, of weeks 1 to 4 and of weeks 5 to 8 after sign-up | workspace and week | `fct_workspace_lifecycle.active_weeks_4`, `active_weeks_5_8` | activation's guardrail G2 |
| Engagement | Runs | free-day runs in the first 84 days (product events); metered runs per paying workspace per month | workspace and day | `stg_product_events`; the main project's `stg_usage_daily` | usage run-rate ARR (last three complete months times 4) |
| Conversion | First paid day | the first day on a self-serve plan or a contract, from the product's plan changes; paying within 28 days; time to first payment | workspace | `fct_workspace_lifecycle.first_paid_day`, `paid_within_28`; monthly `conversions` | **new** ARR in the bridge |
| Retention, logo | Paying workspaces kept | workspaces paying at the month end that were paying at the end of the month before; survival of the first subscription by plan | workspace and month | `fct_lifecycle_monthly.logo_retention_month`; `fct_workspace_lifecycle.first_sub_*` | **churn** in the bridge |
| Retention, usage | Usage-weighted retention | metered runs this month of the workspaces paying at both month ends, over all those workspaces' runs last month | month | `fct_lifecycle_monthly.usage_retention_month` | **usage change** in the bridge |
| Expansion | Seat and contract growth | more seats, a contract's next ramp step, a renewal at a higher price, a contract worth more than the plan it replaced; usage growth | customer key and month | the main project's `fct_arr_bridge`; `fct_nrr_bridge_by_motion` for one year | **expansion** and **usage change** |
| Customer outcome | Paid and kept | first paid day within 150 days of sign-up, and still on a paid plan 90 days after it | workspace | `fct_workspace_lifecycle.outcome` | the target activation is chosen against |

Net revenue retention sits at the top of the paying branch: the cohort's ending ARR over its starting ARR, with every
line of the bridge between them (`fct_nrr_bridge_by_motion`, by motion; `price-realization.html`, all motions).

## Guardrails

Each input metric is read beside the metrics that would show it moving for the wrong reason. A guardrail fires when the
95% interval of the treated minus control difference lies wholly on its harmful side.

| Guardrail | Definition | Watches | Fires when |
|---|---|---|---|
| G1 | the customer outcome among activated workspaces | activation | it falls: more workspaces activate, but fewer of them pay and stay |
| G2 | activated workspaces with a run in weeks 5 to 8 | activation | it falls: activation came from activity that does not last |
| G3 | failed runs per 100 active days, first 28 days | conversion and onboarding | it rises |
| G4 | support tickets per 100 active weeks, first 4 weeks | conversion and onboarding | it rises |

G2, G3 and G4 are known within 8 weeks of sign-up; G1 needs the customer outcome, so it reads later.

## How the tree ties to revenue

- Conversions in the product's plan changes are checked against the billing systems: a workspace's first paid day must
  equal its first card subscription start or, when its CRM account is linked, its first contract start
  (`assert_first_paid_matches_billing`).
- Every product event must fall inside the workspace's first 84 days (`assert_events_inside_window`).
- The bridge by motion must close for each motion and add up to the all-motions bridge (two bookkeeping identities).
