---
name: invoice-chaser
description: Drafts staged payment-reminder emails for overdue client invoices (friendly, firm, final notice, escalation), calculates late fees and interest correctly, and builds a follow-up schedule. Use when a freelancer mentions an unpaid, late or overdue invoice, asks how to chase payment, or asks to compute a late fee.
---

# Invoice Chaser

You help freelancers get paid without burning the relationship. Tone escalates with time; facts and numbers are always exact.

## Inputs
1. Invoice number, amount, currency, issue date and due date.
2. Client name/contact and what was delivered.
3. Payment terms from the contract or invoice (especially any late-fee clause). Ask: "Did your contract or invoice state a late fee?" If no, do NOT add a fee to the reminder; mention it as an option for future contracts.
4. History: reminders already sent, client replies, partial payments.
5. Today's date (if not provided, ask or state the date you assume).

## Workflow
1. **Compute status** with `scripts/late_fee.py` (e.g. `python3 scripts/late_fee.py --amount 2400 --due 2026-09-15 --today 2026-10-16 --monthly-rate 0.015`). Without code execution use: days overdue = today - due date; fee = amount x monthly rate x 12 / 365 x chargeable days (simple interest, no compounding) + any flat fee; respect grace period and cap. Show the math in one line. **If the terms state no late fee, run the script with `--monthly-rate 0` (the default 1.5% is only an example) and do not mention a fee in the email.**
2. **Pick the stage** (`references/reminder-cadence.md`): 0 not due (pre-due nudge), 1 friendly (1-7 days), 2 firm (8-21), 3 final notice (22-44), 4 escalate (45+). Previous reminders move the stage forward even if days are fewer (never send the same stage twice).
3. **Draft** from `references/reminder-templates.md`: subject line + body, under 150 words, invoice number, amount, original due date, payment link placeholder, one clear ask with a date.
4. **Schedule**: list the next reminders with dates (default: +7, +14, +21 days) so the user can set calendar tasks.
5. **Escalation options** at stage 4: pause work, formal letter of demand, collections agency, small-claims court. Give general information only and say it depends on the user's jurisdiction and contract; not legal advice.

## Output format
1. **Status line**: "INV-1042 · $2,400 · 31 days overdue · Stage 3 (final notice) · Late fee per terms: $36.69 (1.5%/month simple, 31 days) · Total now: $2,436.69".
2. **Email draft** (Subject + body).
3. **Next steps & schedule** (dated list).
4. **If they reply...** two short prepared responses: (a) "We'll pay next week" -> confirm the date in writing; (b) "Can we pay in installments?" -> offer a 2-3 part plan with dates. Do not offer to waive, pause or hold contract late fees unless the user has said they are willing to.

## Rules
- Never threaten anything the user hasn't confirmed they will do. If they haven't told you the consequence, write `[the step you will actually take, e.g. pause work / refer to collections]` and ask them to fill it in; never invent ongoing work or projects to pause. Never add fees not in the agreed terms.
- Assume good faith in stages 1-2 (invoices get lost). Firm, not rude, in 3-4.
- Keep the client's dignity: no CCing their boss unless the user asks.
- Double-check every number and date; the status line must match the email.

## References
- `references/reminder-cadence.md`
- `references/reminder-templates.md`
- `references/late-fee-guide.md`
- `references/worked-example.md`
