Workflow · Simple example
Expense approval workflow specification example
A mobile-friendly workflow where employees submit receipts and managers approve or reject them. The spec makes attachment limits, missing managers and resubmission behaviour explicit.
spec.md Requirements and edge cases
The spec describes the user-visible workflow and expected failure handling.
# Expense approval — spec ## 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 has no manager set → the expense goes to the admin. - A receipt file over 10 MB → refused with the limit shown.
tasks.md Build order
The task list keeps the data, employee view and manager view in a practical order.
# Expense approval — tasks ## 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