Skip to content

Prompt-backed scenario · U3Updated

Invoice reminder AI agent: a prompt-backed reference workflow

In brief

An invoice reminder AI agent can timestamp invoice states, remind only when an invoice is more than seven days overdue, notify the account manager, pause new work when a client has two or more overdue invoices, and keep reminders at least three days apart. This page maps the prompt into a contract; it is not a customer result or live billing service.

Corpus U3 · contract map

Decide reminder, notice, and work-hold actions from invoice state.

Review before build
  1. 01 · Input

    Typed request + state

    • invoice_id
    • client_id
    • status
    • status_timestamps
    • due_at
  2. 02 · Decide

    Prompt-owned rules

    • Timestamp every invoice state
    • Remind after the seven-day boundary
    • Hold new work at two overdue invoices
    • Space reminders by three days
  3. 03 · Return

    Inspectable contract

    • invoice_status
    • status_timestamps
    • reminder_action
    • account_manager_notice
    • new_work_hold
PromptApproved contract
Invoice lifecycle and client-level overdue state pass through time and count boundaries before producing reminder, account-manager, and work-hold actions.

Corpus U3

The exact acceptance-corpus prompt

Corpus U3

Freelance Invoice and Payment Reminder Agent

#2567 · source prompt
Need something to track invoices for our freelance agency and remind clients to pay. Just track basic status, sent, viewed, overdue, paid, disputed, with timestamps. If something's overdue by more than a week, send a reminder automatically and let the account manager know. If a client's got two or more overdue invoices at once, put a hold on new work for them. And don't send reminders every single day for the same invoice, space them out at least 3 days apart.

This is a prompt-backed reference scenario, not a customer result, verified generated artifact, deployed service, or live endpoint. The source is the public generation acceptance corpus in issue #2567. At the 2026-08-08 checkpoint recorded there, the Medium scenarios had not been proven end to end.

Contract surface

Input and state fields

Invoice record

The invoice and lifecycle state required by the prompt.

invoice_id
Identifies the invoice being evaluated.
client_id
Groups concurrent overdue invoices.
status
sent, viewed, overdue, paid, or disputed.
status_timestamps
Timestamp per lifecycle transition.
due_at
Anchor for the more-than-seven-day rule.

Reminder and account state

State required to enforce spacing and the client-level work hold.

last_reminder_at
Prevents reminders inside three days.
concurrent_overdue_count
Controls the new-work hold.
account_manager
Receives the overdue notice.

Fields are shown because the rule depends on them. Names are a reviewable contract draft, not a claim about a generated schema.

Decision logic

Business decisions to approve

  1. 01

    Timestamp every invoice state

    Track sent, viewed, overdue, paid, and disputed with transition timestamps.

  2. 02

    Remind after the seven-day boundary

    An invoice more than seven days overdue triggers a reminder and an account-manager notice; exactly seven days overdue does not.

  3. 03

    Hold new work at two overdue invoices

    A client with two or more concurrent overdue invoices is placed on a new-work hold; one overdue invoice is not enough.

  4. 04

    Space reminders by three days

    Reminders for the same invoice stay at least three days apart rather than sending every day.

Response shape

Reviewable output contract

invoice_status
The current prompt-owned lifecycle state.
status_timestamps
Traceable time for every recorded transition.
reminder_action
send or suppress, with the time rule that decided it.
account_manager_notice
Sent with a qualifying overdue reminder.
new_work_hold
True only at two or more concurrent overdue invoices.
next_reminder_at
The first time the three-day spacing rule permits another reminder.

An approved specification should expose these decisions as typed response fields or traceable side-effect records. Generation must not infer a missing rule after approval.

Behavior checks

Positive, negative, and boundary probes

  1. 01

    Exactly seven days overdue

    Do not send the overdue reminder or account-manager notice yet.

    Negative case for the prompt’s more-than-seven-day boundary.

  2. 02

    More than seven days overdue

    Send the reminder and notify the account manager, subject to spacing.

    Positive case for the overdue action.

  3. 03

    One concurrent overdue invoice

    Do not place the client on a new-work hold.

    Negative case for the count threshold.

  4. 04

    Two or more concurrent overdue invoices

    Place the client on a new-work hold.

    Positive case at and above the count threshold.

  5. 05

    Last reminder was less than three days ago

    Suppress another reminder for the same invoice.

    Negative case for reminder spacing.

  6. 06

    Last reminder was exactly three days ago

    The spacing rule permits another reminder.

    Boundary case for the at-least-three-days wording.

Approval gate

Questions the prompt leaves open

The prompt does not define whether paid or disputed invoices remain in the concurrent-overdue count; the approved specification must make that filter explicit.

The delivery channel and failure behavior for reminders and account-manager notices are intentionally unspecified and must be reviewed before generation.

This is where a spec-first workflow earns trust: unresolved boundaries remain visible until a human approves them. Read the seven-step implementation guide or see how the same review boundary fits an agency handoff.

Continue reading

Bring a client workflow.

Create a workspace, spec the requirement and expected API shape, and take the artifact through validation.

Get started