# Dunning ladder policy

A reusable skill the "Collect what's overdue, keep the relationship" recipe pulls in. Add it once and every agent on the team can use it.

Place each overdue invoice on the correct rung of the dunning ladder,
using only the tone assigned to that rung.

## Method
1. Pull the invoice's days-overdue from the latest Stripe pull, not a
   cached figure.
2. Recompute days-overdue independently against the AR aging sheet in
   `{{ar_sheet}}`; hold the invoice if the two figures disagree.
3. Check the send-history log for that invoice and skip any rung
   already sent.
4. Match days-overdue against the ladder's rung boundaries.
5. Assign the tone defined for that rung — never a harsher one.
6. Log the rung and tone before handing off to drafting.

## Rules
- Never advance an invoice past the rung its days-overdue earns.
- Never re-fire a rung already logged as sent for that invoice.
- Recompute days-overdue from a fresh pull before every placement; hold
  on mismatch rather than guess.
- Rung boundaries and days-overdue thresholds (set on first run, then
  stored in memory).
- Never send a collections email without explicit approval — this
  skill assigns the rung, it does not authorize the send.

## Output
A rung assignment per invoice: `{invoice_id, days_overdue, rung,
tone}`, passed to the drafting step.
