Parent: #41
Follow-up to: #42
Problem
The documented tutor loop says to classify and judge the learner answer, update learner state, select a move, and then generate the tutor response.
The current ask_topic flow generates the tutor response first and runs update_learning_metadata afterward.
As a result, the response cannot reliably use the current answer score, misconception, prerequisite gap, or difficulty tier.
The metadata extractor also sees newly generated tutor material, which can reassign the learner's attempt to a concept introduced after the answer.
The Phase 0 dogfood run demonstrated this when a return-value answer was recorded under the newly introduced parameters-and-arguments focus.
Goal
Make the structured answer judgment and learner-state transition authoritative inputs to the tutor move for the same turn.
Scope
- Classify the learner message before answer judging so navigation and unrelated requests are not graded as answers.
- Judge answers against the prior pending question and prior concept focus.
- Apply the resulting score, status, misconception, gap, gaming signal, and tier before generating the tutor response.
- Generate the response from the updated state and selected move.
- Keep tutor-generated new material from changing which concept received the attempt.
- Define safe behavior when the judge call fails without inventing mastery or losing the learner's answer.
- Preserve local-first storage, event logging, streaming behavior where practical, and provider compatibility.
Acceptance criteria
Priority
P0 production correctness blocker.
This should land before prompt tuning because prompt changes cannot reliably compensate for stale same-turn learner state.
Parent: #41
Follow-up to: #42
Problem
The documented tutor loop says to classify and judge the learner answer, update learner state, select a move, and then generate the tutor response.
The current
ask_topicflow generates the tutor response first and runsupdate_learning_metadataafterward.As a result, the response cannot reliably use the current answer score, misconception, prerequisite gap, or difficulty tier.
The metadata extractor also sees newly generated tutor material, which can reassign the learner's attempt to a concept introduced after the answer.
The Phase 0 dogfood run demonstrated this when a return-value answer was recorded under the newly introduced
parameters-and-argumentsfocus.Goal
Make the structured answer judgment and learner-state transition authoritative inputs to the tutor move for the same turn.
Scope
Acceptance criteria
correct_full_answerremains attributed to return values andprerequisite_gapis treated as struggling before remediation is generated.make checkpasses.Priority
P0 production correctness blocker.
This should land before prompt tuning because prompt changes cannot reliably compensate for stale same-turn learner state.