Refunds at the Till
How a shop refunds a purchase at the till.
The model is a small business process: a refund at the till. Its steps say in words who does them — "The cashier checks the receipt" — and those words are for the reader. Who performs each step is declared by edges: the Cashier and the StoreManager each invokes the operations they do, and every step invokes one of those operations.
- Who
- Cashier · Store manager
- Steps
- 3
- Rules
- 2
What must hold
The rules of this model, in its own words, and the step that keeps each one.
Requirements traceability
2 / 2 satisfied (100%)- WITHIN-30A refund is only possible within 30 days of the purchase.✓ Contract:CheckReceipt
- APPROVEDEvery refund is approved by the store manager before money is paid back.✓ Contract:ApproveRefund
Use it with your agent
Connect AIM to the agent you already use, then ask it to start your own version:
Read the AIM context "Refunds at the Till" at https://intentmodel.org/registry/reference/performers/ and start our own version of it for our team.
Browse the model
Refund
View workflow sourceFacets by type
File
AGENTS.md
Who does the work example
Read the repository's ../../specification.md before working on this example. Behavioral authority lives in aim/refunds/refunds.aim.
intent
Refunds at the Till
Summary
How a shop refunds a purchase at the till. Each step says in words who does it, for the reader; who performs it is declared by the edges alone (§7.3, §7.4).
Requirements
- WITHIN-30 — A refund is only possible within 30 days of the purchase.
- APPROVED — Every refund is approved by the store manager before money is paid back.
Persona
Cashier
Role
- Works at the till and handles the customer.
Access
- Checks receipts and pays refunds — invokes · CheckReceipt, invokes · PayOut
Persona
StoreManager
Role
- Runs the store and approves refunds.
Access
- Approves refunds — invokes · ApproveRefund
Trigger
CustomerAsks
A customer comes to the till with a receipt and asks for their money back.
Kind
- external
Fires
Flow
Refund
From the customer's receipt to the money paid back.
Steps
- The cashier checks the receipt — invokes · CheckReceipt.
- The store manager approves the refund — invokes · ApproveRefund.
- The cashier pays the money back — invokes · PayOut.
Contract
CheckReceipt
Checks that the receipt belongs to this shop and that the purchase is recent enough.
Ensures
- The receipt is checked against the refund window — satisfies · WITHIN-30
Contract
ApproveRefund
The store manager approves the refund.
Authz
- Only
#Persona:StoreManager.
Ensures
- The refund is approved — satisfies · APPROVED
Contract
PayOut
Pays the amount back to the customer.
Authz
#Persona:Cashier, or#Persona:StoreManagerwhen the till is busy.
Ensures
- The customer has their money back.
File
README.md
Who does the work, and who may (AIM 5.10)
The model is a small business process: a refund at the till. Its steps say in words who does them — "The cashier checks the receipt" — and those words are for the reader. Who performs each step is declared by edges: the Cashier and the StoreManager each invokes the operations they do, and every step invokes one of those operations.
Who may do it is named the same way: each operation's ### Authz names its roles by address in backticks — `#Persona:StoreManager` — so the store manager may pay a refund out, though the cashier is the one who does. Several named roles are alternatives: any one of them may.
The words could be in any language, with any article and in any order — "Die Kassiererin prüft den Bon" reads the same — because no tool reads a performer or a permission out of a sentence. A step done by someone other than the Flow's performer invokes an operation its performer invokes.
See specification §7.3, §7.4 and §13.11. This example has no View, so it owes no visual identity.
For developers: packages, files and how to check them
AIM Core only
About this example
Who may do it is named the same way: each operation's ### Authz names its roles by address in backticks — `#Persona:StoreManager` — so the store manager may pay a refund out, though the cashier is the one who does. Several named roles are alternatives: any one of them may.
The words could be in any language, with any article and in any order — "Die Kassiererin prüft den Bon" reads the same — because no tool reads a performer or a permission out of a sentence. A step done by someone other than the Flow's performer invokes an operation its performer invokes.
See specification §7.3, §7.4 and §13.11. This example has no View, so it owes no visual identity.