feat: wrong-answer remediation loop - #115
Merged
Merged
Conversation
…e, key-prerequisite remediation Implements the three-slice wrong-answer remediation loop from the Math Academy Way doctrine: Slice 1 — KP-level "more practice" loop: - KPRemediationSelector pure function serves same-KP problems on miss until 2 consecutive correct before advancing - Worked example re-surfaces on first miss per KP per session (verbatim, no generated rewording — FAQ p.416) - Anti-gaming retry delay after 2+ attempts on the same KP - Frontend lesson-flow.tsx rewritten for stream-driven practice via nextProblemHint from the backend Slice 2 — Session-based lesson pause: - LessonPausePolicy pauses concepts after 6 failed KP attempts with unpassed KPs remaining - Paused concepts hidden for rest of session, re-surface as priority P3.5 in the next session (80% pass rate without intervention — p.415) - Task selector respects pause state across all priority tiers Slice 3 — Key-prerequisite remediation + quiz follow-up: - KPPlateauDetector fires on 4+ attempts across 2+ sessions when a key-prereq is authored (slow peel-back anti-gaming — p.415-416) - Quiz misses create immediate P1 remediation records (Ch 21 p.300) - Schema: keyPrerequisiteConceptId on KnowledgePoint (nullable, backfill in progress), pausedAtSessionId + sessionFailedKPAttempts on StudentConceptState, firstFailedSessionId + lastFailedSessionId on StudentKPState - Quality gate: graspful review warns on missing key-prereq links - RemediationCoreModule breaks circular dependency between Assessment and LearningEngine modules Docs: adaptive-learning-architecture.md updated with new wrong-answer doctrine, all claims cite Math Academy Way page numbers. All 613 backend tests pass. All 24 shared package tests pass. No type errors. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
nextProblemHint.KPPlateauDetectorfires on 4+ attempts across 2+ sessions when a key-prereq is authored, creating a P1 remediation. Quiz misses create immediate P1 remediation records.keyPrerequisiteConceptIdadded to KnowledgePoint schema (nullable during backfill). Quality gate warns on missing links.Schema changes
3 migrations:
20260411120000_add_lesson_pause_state—paused_at_session_id+session_failed_kp_attemptsonstudent_concept_states20260411130000_add_kp_key_prerequisite—key_prerequisite_concept_idFK onknowledge_points20260411140000_add_kp_failed_session_tracking—first_failed_session_id+last_failed_session_idonstudent_kp_statesAll nullable/default-zero — no breaking changes to existing data.
New files
kp-remediation-selector.ts(+spec)lesson-pause-policy.ts(+spec)kp-plateau-detector.ts(+spec)remediation-core.module.tsTest plan
🤖 Generated with Claude Code