Give the Agent a Checkable Task
Scenario
You have a booking flowchart and know what should happen for 0, 1, and 2 free seats.
Try it yourself
Which request would let you check the work?
| Case | Result |
|---|---|
| Make booking better | Select a choice above to see what happens. |
| Implement canBook for the drawn rule | Select a choice above to see what happens. |
Reveal the explanation
- Make booking better
The agent must guess the problem and the result.
- Implement canBook for the drawn rule
Add the exact checks 0 → false, 1 → true, 2 → true. Ask for the plan, then the diff and actual test output.
Attach the flowchart and name the function or file. Give the agent only the context it needs for the task.
Shared booking contract
Accept a booking when at least one seat is free.
| Free seats | Expected |
|---|---|
| 0 | false |
| 1 | true |
| 2 | true |
Your turn
Write an agent task with the booking rule, scope, and checks for zero, one, and two seats.
Common mistake Giving the agent only a feature name and letting it invent the rules.
Check your work
The task asks for a plan first, then a focused diff and the actual test output.
This browser could not save your progress. Changes last until you leave the page.