feat: improve AI Mentor configuration - #1818
Draft
Japrolol wants to merge 6 commits into
Draft
Conversation
Japrolol
force-pushed
the
jh_feat_1807_improve_ai_mentor_config_and_introduce_ai_generation
branch
2 times, most recently
from
July 31, 2026 09:38
8d82fec to
b4a39d0
Compare
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.
Issue(s)
1807
Overview
Replaces the generic AI Mentor instructions model with structured Teacher and Roleplay configurations.
Adds normalized configuration, subtype, translation, enum, RLS, migration, and legacy-data backfill support. Existing lessons are migrated without
requiring creator action.
Adds authenticated APIs for retrieving, replacing, and translating configurations while enforcing course ownership, curriculum availability, language
rules, tenant isolation, and exactly one active subtype.
Preserves structured configurations during master-course synchronization and supports legacy Luma imports with safe defaults.
Adds one focused AI Mentor behavior card and manual configuration dialog with:
fields.
Introduces deterministic Teacher and Roleplay runtime prompts. Roleplay responds using plain spoken dialogue without stage directions, Markdown, or
assistant-style formatting.
Prevents currency amounts such as $0.50 and$0.70 from being incorrectly rendered as KaTeX while retaining explicit $ $...$$ math support.
Adds backend, frontend, prompt, migration, translation, synchronization, and curriculum E2E coverage.
Keeps AI-assisted Mentor configuration generation as a separate follow-up slice.
Business Value
Course creators can configure AI Mentor behavior through a clearer, purpose-built experience instead of relying on one broad instruction field. Teacher
and Roleplay modes now capture only the information each experience needs, making authoring easier and model behavior more predictable.
Learners receive more natural and consistent conversations. Roleplay characters maintain stable roles and difficulty without theatrical narration or
formatting artifacts, while Teacher behavior follows an explicit instructional approach.
Existing AI Mentor lessons continue working after migration without manual intervention. Structured multilingual storage, tenant-safe APIs, and master-
course synchronization provide a reliable foundation for future AI-assisted configuration generation.