You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/conversation-flow-architecture.md
+111-2Lines changed: 111 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -205,8 +205,8 @@ sequenceDiagram
205
205
STT->>TMR: Schedule after delay
206
206
TMR-->>STT: timerID
207
207
STT->>SM: Set DataKeyStateTransitionTimerID=timerID
208
-
TMR-->>STT: On fire -> executeImmediateTransition()
209
-
STT->>SM: Set DataKeyConversationState=target; Clear timerID
208
+
TMR-->>STT: On fire triggers executeImmediateTransition()
209
+
STT->>SM: Set DataKeyConversationState=target (clear timerID)
210
210
end
211
211
CF-->>User: Reply from MOD
212
212
Note over CF,MOD: Next message will be routed to the new module per state
@@ -218,6 +218,115 @@ Common handoffs:
218
218
- Coordinator/Intake → Feedback: After a prompt is sent and the user reports an outcome (or when the model decides to gather outcomes), Feedback tracks results and updates profile.
219
219
- Feedback → Coordinator: After processing feedback or after a timeout/follow-up window, return to Coordinator.
220
220
221
+
## Dynamic architecture overview (end-to-end)
222
+
223
+
The following sequence shows a typical dynamic arc across modules, tools, timers, and messaging: Coordinator bootstraps, hands off to Intake for profile building, returns to Coordinator to generate/schedule prompts, then hands to Feedback to process outcomes, finally returning to Coordinator.
224
+
225
+
```mermaid
226
+
sequenceDiagram
227
+
autonumber
228
+
participant User
229
+
participant WA as WhatsApp
230
+
participant RH as ResponseHandler
231
+
participant CF as ConversationFlow
232
+
participant SM as StateManager
233
+
participant CM as Coordinator
234
+
participant IM as Intake
235
+
participant FM as Feedback
236
+
participant GA as GenAI
237
+
participant PST as ProfileSaveTool
238
+
participant PGT as PromptGeneratorTool
239
+
participant SCH as SchedulerTool
240
+
participant STT as StateTransitionTool
241
+
participant TMR as Timer
242
+
participant MSG as MessagingService
243
+
244
+
Note over CF,SM: DataKeyConversationState defaults to COORDINATOR if empty
0 commit comments