Expense claims
An employee hands in an expense claim, an approver decides it, and finance pays it.
A small business process written out whole, in one file: three roles, the claim and its lines, the steps from handing in to payment, and the states a claim moves through. Each rule names what keeps it: the approval step makes sure nobody decides their own claim, the claim's amount must equal the sum of its lines, and a deadline sends a claim nobody decided within five working days to finance.
- Who
- Employee · Approver · Finance
- Steps
- 3
- Rules
- 4
- Deadline
- 5 business days
- Lifecycle
- Submitted → Approved → Returned → Paid
What must hold
The rules of this model, in its own words, and the step that keeps each one.
Requirements traceability
4 / 4 satisfied (100%)- FAIRNobody decides their own claim (from the owner, 2026-11-29)✓ Operation:ApproveClaim
- ADDS-UPA claim's amount is the sum of its lines.✓ Operation:SubmitClaim
- FIVE-DAYSA claim is decided within five working days of being handed in.✓ Trigger:ApprovalDeadline
- RECEIPTSEvery line of a claim has a receipt.✓ Operation:ApproveClaim
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 "Expense claims" at https://intentmodel.org/registry/reference/claims/ and start our own version of it for our team.
Browse the model
ReimburseClaim
View workflow sourceFacets by type
File
AGENTS.md
Agents
Read the repository's ../../specification.md first. This example is one of the whole models the specification shows in §2. The .aim files under aim/ are the authority.
subject
Expense claims
Summary
An employee hands in an expense claim, an approver decides it, and finance pays it.
Requirements
- FAIR — Nobody decides their own claim — from: the owner, 2026-11-29
- ADDS-UP — A claim's amount is the sum of its lines.
- FIVE-DAYS — A claim is decided within five working days of being handed in.
- RECEIPTS (should) — Every line of a claim has a receipt.
Persona
Employee
Role
- Hands in claims for what they spent
Access
- Asks for their money back — invokes · ReimburseClaim
- invokes · SubmitClaim
Persona
Approver
Role
- Decides other people's claims
Access
- Review submitted claims — accesses · Claims cross-owner(claims#Record:Claim)
- invokes · ApproveClaim
Persona
Finance
Role
- Pays approved claims
Access
Record
Member
A person who works here.
Schema
id: string required unique key
name: string requiredRecord
ClaimLine
One thing that was paid for.
Schema
what: string required min(1)
amount: decimal required min(0) unit(EUR)
receipt: fileRecord
Claim
One expense claim an employee hands in.
Schema
id: string required unique key
ownerId: ref(claims#Member.id) required owner
amount: decimal required min(0) unit(EUR)
lines: list(part(claims#ClaimLine)) required
status: enum(Submitted, Approved, Returned, Paid) required default(Submitted)Constraints
amount = sum(lines.amount)
count(lines) >= 1Immutable
ownerId
State
ClaimStatus
A claim is handed in, then approved or returned, and an approved claim is paid.
Of
claims#Record:Claim.status
States
- Submitted — initial
- Approved
- Returned — final
- Paid — final
Moves
- Submitted → Approved — [claims#Operation:ApproveClaim]
- Submitted → Returned — [claims#Operation:ApproveClaim]
- Approved → Paid — [claims#Operation:PayClaim]
Operation
SubmitClaim
An employee hands in a claim with its lines.
Input
amount: decimal required min(0) unit(EUR)
lines: list(part(claims#ClaimLine)) requiredEnsures
- The claim is kept as handed in, and its amount is the sum of its lines — mutates · Claim, emits · ClaimSubmitted, satisfies · ADDS-UP
Operation
ApproveClaim
An approver approves or returns another person's claim.
Input
claimId: ref(claims#Claim.id) required !owner
complete: boolean requiredAuthz
claims#Persona:Approvercross-owner(claims#Record:Claim) !owner
Ensures
- The claim records the decision — mutates · Claim, satisfies · FAIR, satisfies · RECEIPTS
Decides
- Approved — every line is supported by a receipt — emits · ClaimApproved
- Returned — a line lacks its receipt — mutates · Claim
Criteria
Approved when complete = true
otherwise ReturnedOperation
PayClaim
Finance pays an approved claim.
Input
claimId: ref(claims#Claim.id) requiredEnsures
- The claim is paid in full — mutates · Claim, emits · ClaimPaid
Operation
EscalateClaim
Finance takes up a claim that nobody decided in time.
Input
claimId: ref(claims#Claim.id) requiredEnsures
- The claim is brought to the head of the approvers — reads · Claim
Process
ReimburseClaim
From a claim handed in to the money paid.
Steps
- The employee hands in the claim — invokes · SubmitClaim
- The approver decides it — invokes · ApproveClaim — continues: Approved
- Finance pays it — invokes · PayClaim
On Error
- A failed payment leaves the claim approved and is retried the next day.
Event
ClaimSubmitted
An employee handed in a claim.
Payload
claimId: ref(claims#Claim.id) requiredEvent
ClaimApproved
An approver approved a claim.
Payload
claimId: ref(claims#Claim.id) requiredEvent
ClaimPaid
Finance paid a claim.
Payload
claimId: ref(claims#Claim.id) requiredTrigger
ApprovalDeadline
A claim that waits five working days for a decision goes to finance.
Kind
- deadline
Schedule
- 5 business-days after [claims#Event:ClaimSubmitted] — unless [claims#Event:ClaimApproved]
Fires
View
Claims
The claims that wait for a decision.
Display
- Each submitted claim with its lines and receipts — reads · Claim
Actions
- Approve or return — exposes · ApproveClaim
Layout
- The oldest claim comes first.
File
README.md
Expense claims
A small business process written out whole, in one file: three roles, the claim and its lines, the steps from handing in to payment, and the states a claim moves through. Each rule names what keeps it: the approval step makes sure nobody decides their own claim, the claim's amount must equal the sum of its lines, and a deadline sends a claim nobody decided within five working days to finance.
python3 ../check.py ../claimsThe .aim file under aim/claims/ is the model.
For developers: packages, files and how to check them
About this example
python3 ../check.py ../claims
The .aim file under aim/claims/ is the model.