Who does each step: a tool, an agent or a person
Sort the seven things you ask the agent for every month into work for a tool, the agent or you, and say why for each.
2 parts · 6 and 4 min
Free course. Your Maestro, an AI, .
By the end of Module 4, your project could validate an incoming Glossary word file with contract.py, compute regional totals safely with report.py, and verify the whole sequence in scenarios.py. Before any of those files existed, the analyst produced the monthly report by opening a chat with an Glossary word, attaching the new sales file, and pasting a seven-step note called agent_routine.md.
Read the seven requests in agent_routine.md below and notice how many different kinds of work sit side by side in the same list.
# What I ask the agent every month1. Read the new month's file and tell me if anything breaks the contract.2. Total amount by region.3. Compare each region with last month and list any that moved more than 20%.4. Write two sentences for finance explaining the regions that moved.5. Look through the file for anything else that seems unusual.6. When a file is rejected, decide whether it is a supplier mistake or a real change, and tell sales.7. Decide whether this month's report goes to finance.When the analyst ran this routine in a single chat, the agent answered all seven items in one reply. Because the prompt asked the agent directly for the regional totals in step 2 and the Glossary word comparison in step 3, those numbers came from the Glossary word rather than from tested code. Even when a model gives the right numbers one month, asking it to calculate totals or percentages in chat leaves the report open to silent rounding drift, skipped rows, or a different result on a rerun.
At the same time, turning all seven steps into a Python Glossary word would fail at the other end of the list. Code cannot judge whether a rejected file happened because the supplier exported the wrong column or because the company reorganized its sales territories.
The deciding rule
To make a recurring workflow reliable, sort each step into work for a deterministic tool, an agent, or a person according to what makes its answer right:
- A deterministic tool owns any step whose right answer is fixed by a rule you can write down and check against a known month. Even when the agent can perform the step in chat, the agent should at most help you write the code once; the tool runs it every month.
- An agent owns steps that produce words, summaries, or open-ended proposals that a person reads before they count.
- A person owns any step whose answer is a decision someone is accountable for. An agent can gather context or draft a message to prepare that decision, while the person makes the call.
If a step sits on the border between a tool and an agent, ask your Maestro to test it against the rule.
Sorting the seven steps in agent_routine.md
Apply that deciding rule to each line of agent_routine.md:
- Read the new month's file and tell me if anything breaks the contract -> Tool.
What makes a monthly file valid is fixed by explicit rules: columns
order_id,order_date,region, andamount, at least one row, no duplicateorder_id, dates within the target month, allowed region names, and non-negative numeric amounts. You already moved this step intocontract.pyin Module 2, where it catches November's five errors the same way every time. - Total amount by region -> Tool.
Summing
amountfor each region has one exact answer for any input file (for September, 3,000 across North 1,200, South 800, East 650, and West 350). You already moved this calculation intomonth_totalsandreport.pyin Module 3 so the model never computes the totals. - Compare each region with last month and list any that moved more than 20% -> Tool.
The rule here is completely fixed: read this month and last month from
reports/history.csv, calculate each region's percent change, flag any region whose change exceeds 20% up or down (rounded to one decimal place), and note any region that had no total last month. Because you can write that rule down and check it with a Glossary word on September and October (where North moved -33.3% from 1,200 to 800 and West moved +37.1% from 350 to 480), it belongs to a tool. On the next page, you will turn step 3 intocompare.py. - Write two sentences for finance explaining the regions that moved -> Agent drafts, person reads. Turning the flagged figures from step 3 into two readable sentences for finance is drafting work suited to an agent, provided the agent reads the verified output from the tool instead of computing the percentages itself. Because the note goes to finance, a person reads and edits the two sentences before sending.
- Look through the file for anything else that seems unusual -> Split between tool and agent.
Every check you can name by a rule belongs in
contract.pyas a tool check that blocks bad data. The open-ended scan for patterns you have not written a rule for yet can stay with the agent as a list of suggestions for a person to review, never as a pass/fail gate that blocks or publishes the report on its own. - When a file is rejected, decide whether it is a supplier mistake or a real change, and tell sales -> Person (agent may summarize).
When
contract.pyrejects a file, code cannot tell whether the supplier made an export error or the business genuinely changed. The agent can summarize the problemscontract.pylisted and draft a message to sales, while a person investigates and decides whether to request a fixed file or updatecontract.py. - Decide whether this month's report goes to finance -> Person. Sending the monthly figures to finance is a commitment someone is accountable for. The tool confirms that the file passed the contract and the numbers are reproducible, the agent drafts the commentary, and you make the decision to release the report.
Common mistake: Two common traps when dividing the routine
First, avoid keeping a calculation with the agent just because the agent got it right in chat last month; if the right answer is fixed by a formula, move it to code so it cannot drift between runs. Second, avoid going to the opposite extreme of doing all the arithmetic by hand or letting an open-ended agent check act as an automated pass/fail gate. Tools enforce fixed rules and compute numbers, the agent drafts and suggests, and you review and decide.
A good place to stop. Up next: a few questions · 4 min
Try it
Suppose four more tasks come up around the monthly sales report:
- Standardize supplier region names: Convert the supplier's Spanish region labels ("Norte" and "Sur") into the contract's names ("North" and "South").
- Choose chart colors: Pick a color scheme for a regional bar chart in an internal slide deck.
- Send the scheduled email: Email the finished report to finance on the 3rd of each month.
- Explain October's jump in West: Explain to the sales director why West rose from 350 in September to 480 in October.
For each of the four tasks, write down who owns the step (a tool, an agent, a person, or a specific handoff between two of them) and the reason in one sentence. If you have a recurring routine of your own at work, add one step from it and classify that step too. Send your four classifications to your Maestro to check your reasoning before you open the breakdown below.
Classifying the four extra monthly steps
Worked example · 4 steps
Try classifying all four steps on your own first, then open each step below to compare your owner and reason with a complete answer.
Work out the next step yourself, then open it to compare.
When you review your own classification, check that every label rests on the reason behind the step rather than on habit: fixed rules you can test on a known month go to a tool, prose drafts and open-ended suggestions go to an agent for a person to read, and commitments someone answers for stay with a person.
On the next page, you will take step 3 out of agent_routine.md and turn it into flag_moves in compare.py, backed by unit tests in test_compare.py so the monthly comparison runs without the model.