<!-- example:expense-approval -->
# Expense approval workflow specification example

Employees submit expenses with a receipt; their manager approves or rejects them.

- [HTML version](https://specifica.org/examples/expense-approval/)
- [Specifica format](https://specifica.org/format.md)
- [Editable Playground](https://playground.specifica.org/): choose Expense approval and Simple

## spec.md

### Requirements

- [ ] An employee submits an expense with amount, currency, date, category and a receipt photo or PDF.
- [ ] The employee's manager gets an email and sees the expense in their queue.
- [ ] The manager approves or rejects it; a rejection needs a comment.
- [ ] The employee sees each expense's status: submitted, approved or rejected.
- [ ] A rejected expense can be edited and submitted again.

### Edge Cases

- An expense without a receipt → cannot be submitted.
- An employee with no manager set → the expense goes to the admin.
- A receipt file over 10 MB → refused with the limit shown.

## tasks.md

### Build order

- [ ] Data model: employees, managers, expenses, receipts
- [ ] Submit an expense with a receipt upload
- [ ] Manager queue: approve or reject with a comment
- [ ] Email to the manager on submit
- [ ] Employee list of expenses with status

Optional workflow reference: the approved receipt, status and decision rules can be checked change by change, with policy choices left to their owners. [Cognium Autonomous Loop](https://cognium.net/how-it-works/).
