# V2 Player Segmentation

Phase 72.5.2.12 adds `@v2/player-segmentation`, the player segmentation surface
for spend tiers, Bartle-style motivation segments, and operator-defined custom
segments.

The service composes `@iris/analytics` metric identifiers through
`buildV2PlayerSegmentationSurface`. It accepts hashed-account gameplay, spend,
progression, exploration, social, and PvP telemetry, then assigns each account
to:

- spend tiers: `whale`, `dolphin`, `minnow`, or `non_spender`
- motivation segments: `explorer`, `achiever`, `socializer`, or `killer`
- optional custom rule segments based on aggregate feature thresholds

Raw account IDs are not accepted or emitted.

## Policy

- Policy ID: `v2-player-segmentation-v1`
- Source library: `@iris/analytics`
- Segment families: spend tiers, motivation segments, custom segments
- Privacy: account-level joins use `accountIdHash`; raw account IDs are never
  exposed
- Custom segments: rule-based, numeric aggregate features only

## Output

The surface emits:

- per-account segment assignments with confidence and feature evidence
- spend-tier counts and shares
- motivation-segment counts and shares
- custom-segment counts and shares
- chart-ready copies of each segment distribution

## Gates

`check-v2-player-segmentation.py` validates the contract, service package,
source tokens, tests, docs, workflow wiring, Horde gates, and the Phase 72
checklist item. Required gates are `player-segmentation-service-present`,
`player-segmentation-spend-tiers`, `player-segmentation-motivation-segments`,
`player-segmentation-custom-segments`, and `player-segmentation-ci-wired`.

Targeted verification:

```bash
pnpm --filter @v2/player-segmentation run typecheck
pnpm --filter @v2/player-segmentation run test
python V2/ue/Tools/check-v2-player-segmentation.py
```
