Dialogic Teaching: Basic State Machine with Abstraction Routine
Live and Text are parameterized model roles. Chunk-grill and Synthesis-grill are independent FSM harnesses that both reuse the Open-response protocol. Every learner response longer than yes or no is collected, paraphrased, and confirmed by the Open-response protocol, which returns the complete answer to the active teaching node as OPEN_RESPONSE_CONFIRMED. Text generates a persistent mental model. Live presents it, confirms learner understanding, and selects improve or regenerate.
[Live Model + FSM harness] Open-response protocol App owns answer buffer and transitions [Live Model] real-time duplex action or analysis default Gemini Live [Text Model] request-response default Gemini 3.7 Flash
−
25%
+
Reset
2 - Concept Body / Single-chunk Loop
3 - Synthesis and Completion
Abstraction routine (available at any time)
YES: Prerequisite = prereqs[cursor]
YES: Prerequisite confirmed
NO: teach Prerequisite first
YES: verification still required
App atomically applies tool calls
FAIL: attempt limit or surrender
CONTINUE: Live receives remaining aspects and asks follow-up
Present the same chunk again
Prerequisite complete -> retry original chunk
App atomically applies tool calls
FAIL: attempt limit or surrender
CONTINUE: Live receives remaining aspects and asks follow-up
Repeat synthesis verification
same mental model, clearer
I don't want to unpack this
[Text Model]listPrerequisites() ordered prerequisites; cursor = 0
Any unprocessed prerequisites?cursor < prereqs.length
Probe next Prerequisiteprobe_knows(Prerequisite)
[Live Model + FSM harness]Open-response protocol prerequisite probe -> confirmed answer
[Live Model]Prerequisite known?
Recursively call teach(Prerequisite)return_to = advance_prereq_cursor
Complete current Prerequisitecursor += 1
[Live Model + FSM harness]Open-response protocol solicitation -> confirmed answer
[Text Model]Live says Checking and spinner is shown Text assesses confirmed answer passAspect(aspects[]) incrementAttemptOnAspects(aspects[])
App checks aspect statuspass checkboxes + attempt counters
Enter concept bodymastery[Concept] = TEACHING
[Text Model]decompose() ordered chunks
Present current chunkretry address for the same chunk
Await confirmation or questionask_confirm()
[Live Model]Did the learner answer YES? YES still does not establish understanding
[Live Model + FSM harness]Open-response protocol what is unclear -> confirmed answer
[Live Model]Diagnose the failure missing prerequisite or failed delivery?
Try a different explanationreframe(chunk)
Recursively call teach(Prerequisite)return_to = present_chunk
Complete current chunkadvance chunk cursor
[Live Model + FSM harness]Open-response protocol solicitation -> confirmed answer
[Text Model]Live says Checking and spinner is shown Text assesses confirmed answer passAspect(aspects[]) incrementAttemptOnAspects(aspects[])
App checks aspect statuspass checkboxes + attempt counters
Add an integration explanationreframe_integration(Concept)
Complete ConceptMASTERED - return
Infer 'this' from conversation contextfocused Prerequisite or chunk
[Live Model]Can the target be identified?
Propose the inferred target for learner confirmation or correction
[Live Model + FSM harness]Open-response protocol resolve parked target -> confirmed answer
[Text Model]generate / improve / regenerate mental model
[Live Model]present mental model ask if learner understands
[Live Model]Does the learner understand the mental model?
[Live Model + FSM harness]Open-response protocol mental-model confusion -> confirmed answer
[Live Model]improve or regenerate mental model?
Return to main loopreturn according to the focused object
Record Prerequisite as abstractedpreserve abstraction contract
Record chunk as abstractedadvance chunk cursor
Any active Prerequisite or chunk state
VALID - 39 states - 65 transitions - Mermaid static render