The agent could not map “Consulting services” to a Xero account. Someone added another sentence to the prompt: “Consulting services maps to 4000 Consulting revenue.”
The line fixed one failure. It also buried a business mapping rule inside the same text that tells the agent what to do. The next failure adds another sentence.
The lines are not all the same kind of thing.
“Consulting services maps to 4000 Consulting revenue.”
Mapping table“Match customers by billing email when their Xero name is different.”
Matching rule“If the sales-order ID already exists in Xero, do not create another invoice.”
Precondition“If the PO number is missing, save the invoice as a draft.”
Conditional branch“Use the contract currency, not the customer’s default Xero currency.”
Source-of-truth rule“Invoices above $50,000 require finance approval before posting.”
Approval gate“The number of created invoices must equal the number of eligible sales.”
Postcondition“After a timeout, check whether Xero created the invoice before retrying.”
Retry and idempotency policy“Do not post usage invoices until the monthly usage period has closed.”
Temporal precondition“If two Xero contacts match, stop and ask the operator.”
Human decision pointWhy a longer prompt does not solve it.
A prompt cannot keep these concerns separate. The runtime must reinterpret the complete block every time it acts. A new edit has no clear boundary, owner, or independent test.
Store the workflow instead.
Workflow Corp stores each concern in the structure built for it: retained values, preconditions, branches, approval gates, postconditions, and recovery rules. Each step can be run, checked, and repaired without rewriting the rest of the program.
When behavior changes, the workflow gets a new version. A prompt can still be generated for an agent runtime, but it is an output—not the source of truth.