Coach: Sending a Message

Coach: Sending a Message A sequence diagram generated by Archify. POST chat message getViewer; else 401 aiGate: pause, caps refused: 503 'resting' takeMessageSlot, fails closed thread, last 20 msgs, save user msg prompt, SCOPE_RULE, tools (propose only) streamText: Pro, Flash past cap tokens; error = 'try again' streamed answer save reply + ai_usage row endMockAction: End button/timer/end_mock aiGate + mock slot score transcript vs rubric rubric, score, status done Guards Context Stream + store Mock ends Browser · Coach chat · Sequence participant Browser Coach chat Chat route · chat API · Sequence participant Chat route chat API Auth · getViewer · Sequence participant Auth getViewer Cost guards · aiGate, msg slot · Sequence participant Cost guards aiGate, msg slot Coach mode · prompt + tools · Sequence participant Coach mode prompt + tools LLM · DeepSeek Pro/Flash · Sequence participant LLM DeepSeek Pro/Flash Postgres · threads, ai_usage · Sequence participant Postgres threads, ai_usage Mock end · endMock · Sequence participant Mock end endMock