Dunning ladder
Decide the next accounts-receivable reminder step within a capped cadence and emit a gated reminder proposal.
You’re reading version sha-b49ab64cb83d. Go to the current version
Overview
Plan the next reminder in an accounts-receivable dunning cadence without sending the reminder directly.
This skill reads an overdue invoice state and a cadence policy. It chooses the
next allowed reminder step when the account is still within the cap, or
escalates when the cap has been reached. The reminder is only a gated proposed
effect for the send-as catalog skill.
In the manual
Runners
decidestop
Declared by its execution profile. Read the profile
SKILL.md
Dunning Ladder
Plan the next reminder in an accounts-receivable dunning cadence without sending the reminder directly.
This skill reads an overdue invoice state and a cadence policy. It chooses the
next allowed reminder step when the account is still within the cap, or
escalates when the cap has been reached. The reminder is only a gated proposed
effect for the send-as catalog skill.
What this skill does
- Confirms the invoice is actually overdue from the supplied status and aging.
- Reads the policy cap and reminder steps supplied by the operator.
- Chooses the next reminder step without exceeding the cap.
- Emits a
reminder_proposalwith a channel and content digest forsend-as. - Escalates to the configured lane once the cadence cap is reached.
When to use this skill
- An AR operator needs a bounded next action for an overdue invoice.
- A workflow needs to propose a reminder while keeping sending behind a separate approval gate.
- A customer has already received some reminders and the workflow must avoid unbounded follow-up.
When not to use this skill
- To send the reminder itself.
- To dun an invoice that is paid, void, disputed, or not yet overdue.
- To invent cadence rules that are absent from
cadence_policy. - To exceed the reminder cap because a balance remains unpaid.
Procedure
- Validate
invoice_status,aging_days, andcadence_policy. - Refuse if
invoice_status.statusis notoverdueoraging_daysis less than one. - Count prior reminders from
invoice_status.reminders_sent. - If prior reminders are greater than or equal to
cadence_policy.cap, setdecision.actiontoescalate, emit no reminder proposal, and route tocadence_policy.escalation_lane. - Otherwise choose the next step whose
stepis one greater than the number of reminders already sent. - Refuse or escalate if the next step is missing or the invoice is too young
for that step's
min_aging_days. - Emit
reminder_proposalas a gated proposed effect performed bysend-as.
Edge cases and stop conditions
- Paid, void, disputed, or pending invoices return
refusedwith no reminder content. - Missing or empty cadence steps return
refused; do not invent steps. - A missing next step escalates to the configured lane because the policy is incomplete.
- A too-young invoice for the next step returns
refusedand preserves the cap state for audit. - At or above the cap, emit no reminder content and route to escalation.
- Any request to send, retry, or bypass approval remains a gated proposal only.
Output schema
decision:
status: proposed | escalated | refused
step: number | null
action: propose_reminder | escalate | refuse
reasons: [string]
reminder_proposal:
effect: send-as
gated: true
channel: string | null
content_digest: string | null
recipient_ref: string | null
invoice_ref: string | null
amount_due: number | null
currency: string | null
escalation:
required: boolean
lane: string | null
reason: string | null
cap: number
reminders_sent: numberWorked example
Input:
invoice_status:
invoice_id: inv-2026-0601
status: overdue
amount_due: 1840
currency: USD
customer_ref: acct-acme-legal
reminders_sent: 1
aging_days: 22
cadence_policy:
cap: 3
escalation_lane: ar-manager
steps:
- step: 1
min_aging_days: 7
channel: email
content_digest: first-notice-template
- step: 2
min_aging_days: 14
channel: email
content_digest: second-notice-templateOutput:
decision:
status: proposed
step: 2
action: propose_reminder
reminder_proposal:
effect: send-as
gated: true
channel: email
content_digest: second-notice-template
escalation:
required: falseInputs
invoice_status: JSON object withinvoice_id,status, optionalamount_due, optionalcurrency,customer_ref, andreminders_sent.aging_days: number of days past due.cadence_policy: JSON object withcap,escalation_lane, and orderedsteps.
Each cadence step should include:
step: 2
min_aging_days: 14
channel: email
content_digest: second-notice-templateOutput
Return JSON containing:
decision: whether the skill proposed a reminder, escalated, or refused.reminder_proposal: a gatedsend-asproposal when the next step is allowed.escalation: cap state, lane, and reason when escalation is required.
Safety rules
- Never send a reminder directly.
- Never exceed
cadence_policy.cap. - Never dun a record that is not overdue per the inputs.
- Keep the proposal gated behind
send-as. - Escalate rather than proposing another reminder at the cap.
- Do not include raw payment account numbers or secrets in the proposal.
Local verification
Run:
node test.mjsThe test covers a within-cap reminder proposal, a cap-reached escalation, and a not-overdue refusal.
Published execution profile
The execution profile published with sha-b49ab64cb83d, shown as its exact bytes.
| Runners |
|
|---|---|
| Profile digest | sha256:d2dfd11e526db275b8c2395a45233dbf3a1f8528f798777c81191cfffcb78ed3 |
skill: dunning-ladder
version: 0.1.0
catalog:
kind: skill
audience: operator
visibility: public
role: context
category: payments
runners:
decide:
default: true
inputs:
invoice_status:
type: json
required: true
description: Overdue invoice state, reminder history, amount, and recipient reference.
aging_days:
type: number
required: true
description: Number of days past due.
cadence_policy:
type: json
required: true
description: Reminder steps, cap, and escalation lane.
steps:
- id: decide
tool:
command: node
args:
- run.mjs
inputs:
invoice_status: $input.invoice_status
aging_days: $input.aging_days
cadence_policy: $input.cadence_policy
artifacts:
wrap_as: dunning_ladder_packet
stop:
inputs:
reason:
type: string
required: false
description: Harness-only stop path proving the package records stop/error outcomes.
steps:
- id: stop
tool:
command: /bin/false
inputs:
reason: $input.reason
outputs:
decision:
required: false
harness:
cases:
- name: within-cap-reminder
runner: decide
inputs:
invoice_status:
invoice_id: inv-2026-0601
status: overdue
amount_due: 1840
currency: USD
customer_ref: acct-acme-legal
reminders_sent: 1
last_reminder_at: 2026-06-18
aging_days: 22
cadence_policy:
cap: 3
escalation_lane: ar-manager
steps:
- step: 1
min_aging_days: 7
channel: email
tone: friendly
content_digest: first-notice-template
- step: 2
min_aging_days: 14
channel: email
tone: firm
content_digest: second-notice-template
- step: 3
min_aging_days: 21
channel: email
tone: final
content_digest: final-notice-template
expect:
status: sealed
receipt:
schema: runx.receipt.v1
operator_journeys:
- mode: standalone
confusors:
- settle-invoice
- send-as
request: Decide the next dunning step for this overdue account.
expected_outcome: Return the next ladder step and a gated message proposal, sending nothing.
- mode: composed
request: Continue this dunning-ladder work from evidence already gathered upstream.
expected_outcome: Return the next ladder step and a gated message proposal, sending nothing.
prior_evidence:
- The account balance and dunning history already supplied.
must_not_repeat:
- Do not send reminders or charge the account.
- name: missing-policy-fails
runner: stop
inputs:
reason: cadence_policy missing
expect:
status: failure
Published package and test evidence.
This exact version passed its recorded harness run: 2 checks passed · 0 failed.
Test result
| Harness result | Passed |
|---|---|
| Tested version | sha-b49ab64cb83d |
| Recorded result | 2 checks passed · 0 failed |
| Result source | Reported by the publisher (runx_registry_publish) |
| Suite | runx-harness |
| Test recorded | |
| Declared cases | 2 |
| Test record | Open the recorded run |
Inspect receipt references
sha256:2c976da66b03e0246e964eadf3a84fbd71387eda8584d59b7d24225ce3a80c0asha256:574a4f9e2ec5645826eb435b2e1b803e71154b1c7829dabc576a4fcdd113aedbPackage identity
| Published revision | sha-b49ab64cb83d |
|---|---|
| Content digest | sha256:b49ab64cb83d92ec60c74c62780c7a1b6d72b16ee95d1b9a9844f53cead07843 |
| SKILL.md digest | sha256:e2a496b71183823185881262c41bb6fbf115b7c5945e4712058ed12c27e284e4 |
| Execution profile digest | sha256:d2dfd11e526db275b8c2395a45233dbf3a1f8528f798777c81191cfffcb78ed3 |
| Publisher identity | Unverified publisher · Kid |
| Trust tier | CommunityPublished through the registry without publisher verification. This tier is not a code assessment. |
| Attestations |
|
| Source provenance | Not published with this version |
Version history
sha-7abbdbea3f20Content digest sha256:7abbdbea3f20fffc5b16aa41acd7f70b9053c2bcbb3bb972a1deaddbbce0990fsha-b668595d90c7Content digest sha256:b668595d90c74968cf9b0ecbea6b70955b1ba89143e8136ba11d2e971eedf19dsha-b49ab64cb83dViewingContent digest sha256:b49ab64cb83d92ec60c74c62780c7a1b6d72b16ee95d1b9a9844f53cead07843sha-6a4a17a73b23Content digest sha256:6a4a17a73b23f39819c84e929a2573c60e8927fc70db8c2fdc3bc54200a8d390