Repository navigation
feat(elos): agent practice in the app and sentence questions per chapter - #28
Conversation
…ery chapter - The MCP server writes elos-practice.json (per-chapter counts, DERIVED_PRACTICE) next to the learner snapshot; the app reads it from the shared folder, validates it strictly and shows it in the agent panel without touching mastery. - Chapters whose sources define nothing get questions from real course sentences with the notion blanked out; wrong answers are notions of the same subject. Timestamps, table rows, code, glued slide headings and duplicates are filtered; common words are asked only in the chapter's sense. 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: 3774b85cec
ℹ️ 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".
| .sort((a, b) => Math.abs(a.length - label.length) - Math.abs(b.length - label.length) || a.localeCompare(b)) | ||
| .slice(0, CHOICES - 1); | ||
| if (distractors.length < CHOICES - 1) continue; | ||
| const id = `cloze:${document.id}:${page.pageNumber}:${passage.id}:${conceptKey(label)}`; |
There was a problem hiding this comment.
Include the sentence in each cloze identifier
When a passage contains two qualifying sentences for the same notion, both receive this identical cardId; imported passages intentionally group multiple sentences. The MCP endpoint can randomly serve the later question, but when grading it reconstructs the quiz and uses .find() by cardId, which selects the first question and returns a citation for a different sentence. Include a sentence index or hash in the identifier so the prompt, correction, retry history, and citation remain aligned.
Useful? React with 👍 / 👎.
| useEffect(() => { | ||
| if (!folder) return; | ||
| let alive = true; | ||
| void readAgentPractice(folder).then((value) => { if (alive) setPractice(value); }); | ||
| return () => { alive = false; }; | ||
| }, [folder, status]); |
There was a problem hiding this comment.
Refresh practice when the agent updates the file
If Hermes records an answer while the Data page remains mounted, only elos-practice.json changes; neither folder nor status changes, so this effect never reads the new counts. AgentAutoSync also only writes the snapshot and does not notify this panel, leaving the displayed practice stale until navigation/remount or a status transition. Polling while visible or reacting to visibility/focus would make the new hand-back behavior observable.
Useful? React with 👍 / 👎.
| /** A single lowercase word ("objet", "revue") has several senses; acronyms and multi-word terms do not. */ | ||
| function commonWord(label: string): boolean { | ||
| return !/\s/.test(label.trim()) && label === label.toLowerCase(); |
There was a problem hiding this comment.
Apply sense filtering to title-cased common notions
When the pedagogical base supplies a normal title-cased label such as Objet, Revue, or Sprint, this predicate returns false solely because the label is not lowercase. Since base parsing preserves label casing, inSense then skips the chapter-keyword check and can turn an unrelated occurrence of that common word into a question. Case should not determine whether a single ordinary word needs semantic filtering; only genuine acronyms should be exempt.
Useful? React with 👍 / 👎.
Summary
elos-practice.json(per-chapter counts,DERIVED_PRACTICE) next toELOS_STATE_FILE; the app reads it from the folder it already shares, validates it strictly (engineer-learning-os/agent-practicev1) and shows it in Data → Agent local. Never changes mastery.Test plan
npm run lint,npx tsc --noEmit, fullnpm run test:ci(667/667)🤖 Generated with Claude Code