---
name: priority-ranker
description: "Order any list of items using the profile's urgency weights. Cross-cutting skill used by the morning round's top three and chase-progression's stalled list."
---

# Priority ranker

A cross-cutting building-block skill. Given a list of items with feature attributes, returns the same list ordered by relative urgency.

## Inputs

The calling workflow passes:

- A list of items. Each item has a feature attribute map (for chase-progression, the features are risk score, fee value, days stalled, recipient type, and so on).
- An optional cap on how many top items to return (the morning round uses 3).

## What it does

Reads the profile's weights for the relevant features. Returns the items in descending urgency order. If the cap is supplied, returns only the top N.

For the top-three case the skill also returns, alongside each item, the feature that contributed most to its rank. The calling workflow uses that feature to write the reason sentence the operator reads ("Mrs Patel, her buyer's mortgage offer expires in 9 days and the survey was booked but not done").

## Learning

When the operator actions a different item than the top-ranked one within the same session, the weighting reweights toward whatever feature distinguished the actioned item. Slow signal, high quality. All writes go through `profile-writer`.

## What it does not do

- It does not generate the reason sentence. That is `variance-narrator`.
- It does not decide what to do with the ranked items. The calling workflow owns that.
- It does not write to the CRM.

## Connectors

Read: profile (weights). No writes.

## Profile keys

- `realagent.priority_weights.*` (per feature, learned)
- `realagent.priority_weights.fee_multiplier`
