State-transition prompting asks an AI system to model a complex workflow as explicit states and transitions, including what happens when transitions fail. section 9.6.1
A strong workflow prompt specifies:
- The ordered states the workflow can enter. section 9.6.1
- The transitions connecting those states. section 9.6.1
- Error states or recovery paths for failed transitions. section 9.6.1
Order-processing prompt
Create a state machine for order processing that handles pending → paid → processing → shipped → delivered, with error states for each transition. This turns an implicit workflow into an explicit design that can be reviewed before implementation. section 9.6.1
<requirements>...</requirements> <implementation>...</implementation> <tests>...</tests>
Organize a workflow request into requirements, implementation, and tests so the generated result can be reviewed in stages. section 9.6.1
