Skip to content

Commit 99df889

Browse files
docs: add legacy conversation flow contract for Python rewrite
Co-authored-by: MinecraftFuns <25814618+MinecraftFuns@users.noreply.github.com>
1 parent 3a882b7 commit 99df889

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

docs/legacy-conversation-flow-contract.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ All keys defined in `internal/models/flow_types.go:L33-L52`:
199199
- **System prompt:** `prompts/conversation_system_3bot.txt` loaded via `LoadSystemPrompt()` (`L150`). Used as fallback; primary routing uses module-specific prompts.
200200
- **Tools:** None directly exposed to LLM. Acts as router only.
201201
- **Behavior:** Gets history → appends user message → checks polls → handles reminder reply → routes to module by sub-state → appends assistant response → saves history.
202+
- **Critical invariant:** The top-level `CurrentState` is always `"CONVERSATION_ACTIVE"`. Sub-state routing (`INTAKE`/`FEEDBACK`) uses `DataKeyConversationState` from `StateData`, not `CurrentState` (see §3.1).
202203

203204
### 4.2 IntakeModule
204205

@@ -387,7 +388,7 @@ Defined in `tone.go:L37-L41`:
387388
- `formal``casual`
388389
- `direct_coach``gentle_coach`
389390

390-
If both tags in a pair have score ≥ 0.7, the higher score is kept and the lower is set to 0.39.
391+
If both tags in a pair have score ≥ 0.7, the higher score is kept and the lower is set to 0.39 (i.e., `deactivateThresh - 0.01`), ensuring it falls below the 0.4 deactivation threshold and will be deactivated.
391392

392393
### 6.3 Tag Storage
393394

0 commit comments

Comments
 (0)