Part 1
Classify every operation
Study first
- The four kinds: a request answers in a few seconds while the caller waits; a stream sends as it goes, server-sent events one way and WebSockets both ways; a job runs off the request for seconds to minutes and is retried; a workflow runs for minutes to days, durable, waiting on people and events (Day 18).
- The question for each operation is how long it takes, whether someone is waiting, and what happens when it fails halfway.
Build
docs/execution.md: every operation in a table, the kind, where it runs, and why. Pages and writes, webhooks and voice turns are requests; the chat is a stream; reading a document, answering a text message, delivering events and the crons are jobs; document approval is a workflow.- Read the table for what is filed wrong.
POST /api/documentsread each document with two model calls and retries inside the request, 5 to 15 s: it now stores the document, hands it to the workflow and answers 202 with an address to follow. Investigating a request runs an agent for minutes inside a server action: still a request today, named as the next to move.
Done when
- Each operation has a row, and the ones in the wrong place are either moved or named.






