Repository navigation
feat(elos): pedagogical base, cited course questions, private answer keys - #27
Conversation
Course map (objectives, prerequisites, example, analogy, frequent mistakes) from a schema 1.0 export, kept as DERIVED_MATERIAL. Answer keys stay apart from questions, and an audit blocks guessable MCQs (longest option correct, reused distractors) and copy-pasted flashcards. New MCP tools elos_course_map and elos_course_exercise (solution only after the learner's attempt); Studio import panel. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 27eaed615c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| return base.exercises.filter((exercise) => exercise.chapterId === chapterId && base.answerKey.has(exercise.id) | ||
| && (exercise.options.length >= 2 ? report.usable.mcq : report.usable.openExercises)); |
There was a problem hiding this comment.
Exclude unsourced exercises from practice
When an exercise has an empty sourceIds array, this predicate still admits it as long as an answer exists and its exercise category is globally usable. This contradicts the import contract in docs/integrations/HERMES.md:35-37, which says exercises without sources are discarded, and lets elos_course_exercise serve generated prompts that cannot be checked against course material. Filter these exercises out individually rather than merely reporting UNSOURCED_EXERCISES as a warning.
Useful? React with 👍 / 👎.
| server.registerTool("elos_course_map", { | ||
| title: "Course map of the learner's programme", | ||
| description: `Subjects and chapters of the learner's programme from the pedagogical base (ELOS_BASE_DIR). Without chapter_id: chapters list and quality audit. With chapter_id: objectives, prerequisites, notions, worked example, analogy and frequent mistakes, to structure an explanation. ${baseNote}`, | ||
| inputSchema: { chapter_id: z.string().optional() }, |
There was a problem hiding this comment.
Namespace chapter lookups by pedagogical base
When two configured export folders reuse a chapter ID, the list response distinguishes them by base name, but the follow-up request accepts only chapter_id and returns the first matching base in sorted order. IDs are only required to be nonempty and are not globally unique, so the corresponding chapter in every later base becomes inaccessible; exercise IDs have the same ambiguity in the other tool. Include a base identifier in both lookup contracts or return composite IDs.
Useful? React with 👍 / 👎.
| type Saved = Readonly<{ chapters: readonly BaseChapter[]; report: QualityReport; importedAt: string }>; | ||
|
|
||
| function readSaved(): Saved | null { | ||
| try { return JSON.parse(window.localStorage.getItem(STORAGE_KEY) ?? "null") as Saved | null; } catch { return null; } |
There was a problem hiding this comment.
Reject malformed saved base payloads
If this localStorage entry contains syntactically valid but incomplete JSON such as {} or [], the cast returns it as Saved; rendering then calls saved.chapters.map and crashes the whole Learning Studio before the learner can use the removal button. Validate the persisted shape and fall back to null so corrupted or incompatible saved state remains recoverable.
AGENTS.md reference: AGENTS.md:L28-L31
Useful? React with 👍 / 👎.
- chapter-practice: multiple-choice questions built from the learner's own course files for each programme chapter, with page citations; wrong answers from the same subject (curated confusions first) with similar length; extracted terms cleaned of bullets and clause starts. - elos_course_exercise serves them first, grades them after the attempt, logs DERIVED_PRACTICE outside the shared folder and asks missed questions again; base exercises remain the fallback. - mcp:split-base moves answer keys out of the folder the agent browses (ELOS_ANSWERS_DIR); an inline key is reported. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Summary
pedagogical-base.ts: parses a schema 1.0 export (courses/exercises/flashcards) into a course map kept asDERIVED_MATERIAL; answers shipped inside questions are stripped.elos_course_mapandelos_course_exercise(statement first, solution only after the learner's answer; audited-out MCQs never served), configured withELOS_BASE_DIR.Test plan
npm run lint,npx tsc --noEmit, fullnpm run test:ci🤖 Generated with Claude Code