Skip to content

feat(elos): agent practice in the app and sentence questions per chapter - #28

Merged
eulogep merged 1 commit into
mainfrom
feat/agent-practice-sync
Oct 23, 2026
Merged

eulogep merged 1 commit into
mainfrom
feat/agent-practice-sync

Conversation

@eulogep

@eulogep eulogep commented Oct 23, 2026

Copy link
Copy Markdown
Owner

Summary

  • Agent practice back in ELOS: the MCP server writes elos-practice.json (per-chapter counts, DERIVED_PRACTICE) next to ELOS_STATE_FILE; the app reads it from the folder it already shares, validates it strictly (engineer-learning-os/agent-practice v1) and shows it in Data → Agent local. Never changes mastery.
  • Sentence questions: when the sources hold no "X est…" definition for a chapter, a real course sentence using the notion is quoted with the notion blanked; wrong answers are notions of the same subject. Filters reject transcript timestamps, table rows, code, glued slide headings and duplicates; single common words are asked only when the sentence shares a keyword with the chapter.
  • Measured on the learner's own library (counts only): cited questions now cover 12 of 16 programme chapters (70 questions), up from 6.

Test plan

  • Unit tests with synthetic fixtures (summary build/parse, app-side reading with a fake folder handle, sentence questions and filters, MCP publication)
  • npm run lint, npx tsc --noEmit, full npm run test:ci (667/667)

🤖 Generated with Claude Code

…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>
@vercel

vercel Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
daily-english-mission Ready Ready Preview Oct 23, 2026 12:14pm UTC

@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing

@coderabbitai

coderabbitai Bot commented Oct 23, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7bc61455-f7c9-4018-893f-b92762719f78
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-23T12:16:56.790261Z 3774b85 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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)}`;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Comment on lines +22 to +27
useEffect(() => {
if (!folder) return;
let alive = true;
void readAgentPractice(folder).then((value) => { if (alive) setPractice(value); });
return () => { alive = false; };
}, [folder, status]);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Comment on lines +135 to +137
/** 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();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@eulogep
eulogep merged commit 447a71f into main Oct 23, 2026
5 checks passed
@eulogep
eulogep deleted the feat/agent-practice-sync branch October 23, 2026 13:39

This branch was successfully deployed

1 active deployment
Preview — 3774b85c Deployed Oct 23, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant