Lesson 2 of 5, 15 min with the exercise
Write the job description
Define the job clearly enough that you could hand it to a new hire.
If you can't describe the job for a person, a model won't do it well either. Write the spec before you build anything.
- Goal: one sentence on the outcome.
- Inputs: what it receives and where from.
- Done: what finished looks like, in a form you can check.
- Limits: what it must never do.
- Hand-off: when it stops and asks a person.
Goal: Prepare a suggested reply for overdue invoices. Inputs: Invoice record, payment history, last 5 emails. Done: A draft reply and a one-line reason, saved to the account. Limits: Never sends email. Never offers a discount. Hand-off: Stop and flag if the customer mentions a dispute or a lawyer, or if the amount is over the set limit.
See it in practice
Test the spec with awkward cases before you build: a customer who has paid half, an email in another language, an account with two open disputes. If the spec doesn't say what should happen, decide now. Each of these answers is one less bad surprise later.
Common mistake: Writing limits as vague advice, like "be careful with discounts". Write the rule you could check afterwards: "Never mention a discount."
Try it
Fill in the five lines for your own task, then give them to a colleague and ask what they'd do in two awkward cases. Every question they ask is a gap in your spec.
You're done when
- All five lines are filled in
- A colleague can say what should happen in three awkward cases