Skip to content

Feat/feedback leLearning support from participant feedback: required exercises, lesson order, skip quizzes, stuck helparning support - #19

Merged
RazHadas merged 12 commits into
TovTechOrg:masterfrom
noa-maurer:feat/feedback-learning-support
Nov 30, 2026
Merged

RazHadas merged 12 commits into
TovTechOrg:masterfrom
noa-maurer:feat/feedback-learning-support

Conversation

@noa-maurer

@noa-maurer noa-maurer commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This PR turns the findings from the participant feedback analysis into course behaviour. Two patterns stood out: exercises were often skipped (slides mode had no exercises step at all), and learners got stuck without asking for help, even though asking the AI was one of the most valued parts of the course. The PR makes exercises required and tracked, enforces the lesson order (the no-order alternative below doesn't), lets learners who already know a lesson or module prove it with a skip quiz instead of sitting through it, and adds a help flow for learners who are stuck.

It is based on the current master: #17 and #18 are merged in, and the conflicts are resolved so both work together. Where this PR changes a rule from #17, it's listed under Policy changes to review.

An alternative without lesson-order enforcement is on branch feat/feedback-learning-support-no-order. It's the same PR except for the order rule (see below), in case you prefer learners to choose their own order.

What changes for the learner

  • Exercises are part of every lesson, in both teaching and slides mode. Every exercise is done before the next lesson. Exercises are tracked in progress/exercises-lesson-X.Y.md, which records the planned list, each answer and the feedback, so a new conversation continues with the same exercises.

  • Lessons go in the course order. A lesson starts only when every earlier required lesson is complete: slides plus required exercises, or a passed skip quiz. Optional lessons (רשות) never block. On Windows, a hook checks this whenever a lesson script is opened and adds a factual note for Claude. On Mac/Linux the hook doesn't run, so order.md tells Claude to check the earlier lessons' progress files itself.

  • "Learn it, or quiz first?" at the start of every lesson, in every style.

    • 8/10 or more: the lesson is passed. Every wrong answer gets a detailed explanation, because its slide won't be taught.
    • Below 8: only the sections answered wrong are taught, and only their related exercises are required.
    • A module skip quiz can pass a whole module. It's offered once, before the module's first lesson starts, and needs 8+ and a correct answer for every lesson.
  • Paid tools never block learning. If an exercise seems to need payment, Claude first suggests free ways (a free trial doesn't count as free), then adapts the exercise to free tools with the same learning goal, marked "(גרסה מותאמת)". Only if that's impossible is the exercise skipped and flagged in progress/exercise-flags.md for the mentors. The learner never waits for a mentor's answer.

  • Stuck help (stuck.md). "נתקעתי" / "stuck", or a hook that detects stuck phrases in Hebrew and English (error words count only in the learner's own words, not inside pasted program output), opens a help flow with two paths:

    • "I don't understand": a new explanation from a different angle, then a check question.
    • "It doesn't work": Claude collects the goal, what was expected, what actually happened, and the evidence; tries the smallest fix first; and never suggests turning off a security protection.

    It teaches what a good help request contains, and logs each case to progress/stuck-log.md.

  • Quiz or mini project at the end of a lesson: optional, at most one. Only the exercises are required.

  • Hebrew learners type Hebrew words: הבא / המשך / נתקעתי (English still accepted).

  • /learn status shows status by completion (complete / in progress / not started / optional), with scores as extra information. Skip-quiz scores are labeled "(מבחן דילוג)" and don't count in the average or the review dates.

Policy changes to review

Topic master now This PR Why
Skipping exercises Required, but a learner may skip one on request; it's recorded and they're reminded All required exercises must be done. Only a paid exercise is skipped, after free ways and an adapted version, and it's flagged Skipped exercises were the main feedback finding
Paid exercises Exercise files say "עצרו ופנו למדריך" Free ways, then an adapted version, then skip + flag. No waiting for a mentor. COURSE.md and exercises.md both say these rules replace the old instruction; the exercise files themselves aren't changed yet Waiting for a mentor pauses learning, and a learner outside TovTech has no mentor
Lesson order Free Earlier required lessons must be complete (optional lessons exempt). The alternative branch doesn't block. Learners skipped lessons and exercises
Skip quiz Offered only when a learner says they know the lesson; pass = 7, below 7 the whole lesson is taught. Diagnostic mode always quizzes first and then teaches the weak sections (no pass) Offered at every lesson, in every style; pass = 8, matching the course's "Mastered = 8+"; below 8, only the weak sections are taught, and only their related exercises are required. Diagnostic mode suggests "quiz first", so 8+ now skips the lesson there too In every style, the learner decides for each lesson separately whether to learn it or show they already know it
Lesson status "Mastered" after a full quiz of 8+ By completion; quiz mastery stays as extra information Quizzes are optional, so complete lessons showed as "in progress"
Lesson skip quiz — Only for a lesson not started yet. Once learning starts, the lesson is finished by its slides and exercises So a learner can't quiz out of the exercises
Module skip quiz — One attempt, only before any lesson of the module starts The feedback from a first attempt could be used to pass a second one without understanding

Other changes

  • Saving order: a reply that saves shows its content first, then saves, then ends with one closing line asking for the next step, never a summary. Saving first had revealed quiz scores in the permission prompt before the learner saw them.

  • No escape sequences (\u200F) in chat or in saved files, and no HTML tags in chat, because both showed up as literal text.

  • The next lesson is named only from COURSE.md, never from a script. After the last lesson, the next step is the final project.

  • Slide numbers are taken from the script, with a check before the last slide that none was skipped. Thinking questions must be answerable from the material learned so far.

  • Free-text quiz answers are graded by ideas, not wording.

  • Readable Hebrew quiz options: mixed Hebrew/English text direction can flip the order of English terms on screen, so each of two opposite options could look as if it said the other one's meaning. When the difference between options depends on English terms (e.g. "Input" vs. "Output"), the options now write those terms in Hebrew or put them at the start of the option.

  • COURSE.md has a ## משאבים table listing each external resource the exercises use and how to get it. Claude Code is listed as a course prerequisite (a paid Claude plan, Pro or higher, as in the README), so an exercise that uses it doesn't count as "requires payment".

  • New hooks, both Windows PowerShell scripts:

    • UserPromptSubmit: detect-stuck.ps1
    • PostToolUse on Read: check-lesson-order.ps1. The command starts PowerShell only when the read is a lesson script (_script.txt).

    Both use the same shell form and guard as master's Stop hook (command -v powershell >/dev/null 2>&1 || exit 0; ...), so on Mac/Linux they exit silently. On Windows, Claude Code runs shell-form hooks through Git Bash; without Git for Windows they show an error, the same as master's Stop hook. The README's requirements list this per OS. The Stop auto-save hook keeps master's version.

  • tests/validate_structure.py has regression guards for all of the above, alongside master's checks.

The no-order alternative

Branch feat/feedback-learning-support-no-order is the same as this PR, except for these differences:

  • Any lesson, in any order. Nothing is blocked. The learner may also leave a lesson in the middle, for example because it's too hard, and start another one.
  • Honest completion. A lesson still counts as complete only after its required slides and required exercises are done, or a passed skip quiz. A lesson left in the middle stays "in progress" in /learn status.
  • A reminder instead of a block. When a new lesson starts while another started lesson isn't complete, Claude reminds the learner in one line, then starts the chosen lesson without asking. The hook is check-unfinished-lessons.ps1, instead of check-lesson-order.ps1. Optional lessons are never listed.
  • Suggestions: a started lesson that isn't complete comes first. Otherwise, the first incomplete lesson in the course order, and the learner may choose any other. Setup offers jumping to any lesson.
  • The module skip quiz is offered at the start of any lesson of a module where no lesson was started yet, not only at the module's first lesson. It's still one attempt only.

Everything else is the same as in this PR, including the exercise rules (Claude never skips them, and the paid-tool flow), the lesson skip quiz only for lessons not started, the saving order, stuck help and status.

The no-order branch got its own short manual test of the differences (2026-11-12). The fixes made after that, and the merge with #17 and #18, are covered only by the automated checks (validator and hook tests).

How it was tested

  • Validator: python tests/validate_structure.py passes. A copy with each new rule removed fails on every one of them.

  • Hook tests: python tests/test_hooks.py runs each hook the way Claude Code does, with a fake course and a fake learner folder (Hebrew in the path), so no real data is touched:

    • stuck hook: 19 cases, including error words inside pasted program output
    • lesson-order hook: 40 cases, including optional lessons and the exercise plan
    • the exact commands from .claude/settings.json, run through Git Bash: 7 cases, including a Hebrew round trip, a non-script read that must not start PowerShell, and a machine without PowerShell (as on Mac/Linux), where both hooks must exit 0 with no output
    • 66 cases in total; no-order branch: 58

    The hooks are Windows PowerShell, so CI now has a second job, on windows-latest, that runs these tests (.github/workflows/validate.yml).

  • Live check of the new hook commands in Claude Code (Windows 11 with Git Bash, a test learner, 2026-11-28): "נתקעתי" opened the stuck flow, and starting lesson 2.4 with 2.1 and 2.2 not started produced the order note, after which Claude offered 2.1 instead of teaching 2.4.

  • Two full manual test runs as a learner in Claude Code (VS Code, Windows 11): 2026-10-24 → 2026-11-09 and 2026-11-12 → 2026-11-23. They covered:

    • lessons and quizzes in every style and in slides mode
    • lesson and module skip quizzes, both pass and fail
    • lesson order
    • paid-exercise adaptation
    • the stuck flow, including real blockers: the claude CLI not installed, and Windows Smart App Control blocking a new pydantic_core DLL
    • status and resume

    The findings from the first run were fixed, then checked in the second run.

  • What wasn't retested:

    A third full run, or a check with a real learner, is still recommended before relying on these rules.

Proposals, not in this PR

  • Final project: let learners preview all projects and their full specs at any time (read-only), and start the project only after the course is complete.
  • Hebrew output, still open: the tutor's live Hebrew is sometimes a literal translation (e.g. idioms), and mixed Hebrew/English text direction can still make sentences outside quiz options hard to read. Both could be addressed in the tutor's instructions, in a future change.

Content findings for the maintainers (not changed here)

  • VAT is 17% in 2.6_script.txt (line 53), 2.2_exercises.md and 1.3_exercises.md. It has been 18% since January 2025.
  • 0.2_exercises.md, item 4: the answer key says Claude is named after Claude Shannon. Anthropic hasn't confirmed this officially; it's only widely reported.
  • 2.6_exercises.md, exercise 2, task 2: it expects Claude Code to read the file through the MCP tool, but Claude Code prefers its built-in Read tool. The task should say to ask explicitly for the MCP tool.
  • 0.1_exercises.md:
    • Exercise 2's title mentions Temperature, but its two experiments differ only in the prompt.
    • Exercise 3 doesn't state the user's role or what a complete answer includes.

🤖 Written with Claude Code, reviewed and edited by me.

noa-maurer and others added 8 commits October 19, 2026 09:38
Based on the Tov-Learn participant feedback analysis:

- slides.md: end of lesson now always runs the exercises flow (it had no
  exercises step), and exercises are saved to
  progress/exercises-lesson-X.Y.md as in teaching.md. teaching.md marks
  exercises as required.
- New Stop hook check-exercises.ps1: a lesson finished in the last 15
  minutes with no exercises file makes Claude give the exercises before
  finishing. Reminds once per lesson; exits on stop_hook_active.
- New stuck.md module (/learn stuck, "stuck" / "נתקעתי"): separate flows
  for not understanding the material and for something that doesn't work;
  teaches the goal/expected/actual/evidence help request; logs to
  progress/stuck-log.md. Teaching mode mentions it once per lesson.
- New UserPromptSubmit hook detect-stuck.ps1: Hebrew/English "stuck"
  phrases add a note pointing Claude to stuck.md (prompt not blocked).
- status.md: dashboard shows exercises done / skipped per lesson.
- Fix: the existing auto-save hook never resolved its script path
  ($env:CLAUDE_PROJECT_DIR inside single quotes). All hooks now use the
  documented exec form with Join-Path $env:CLAUDE_PROJECT_DIR.
- tests/validate_structure.py: guards the new module, the exercises step
  in both modes, and that every hook script exists.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Save point before testing (not pushed).

- New shared reference modules: exercises.md (every exercise is done
  before the next lesson; tracking file, paid-resource exception) and
  order.md (lessons go in COURSE.md order; what counts as complete).
- New hook check-lesson-order.ps1; check-exercises.ps1 removed.
- Updates to learn.md, teaching, slides, quiz, resume, setup, status,
  progress, detect-stuck.ps1, settings.json, CLAUDE.md, COURSE.md and
  the structure validator.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lides mode

- At the start of every lesson (teaching mode, all styles, and slides mode)
  the learner chooses: learn the lesson, or take its skip quiz first. At a
  module's first lesson the module skip quiz is offered too.
- Skip quiz: 8+ passes the lesson (no slides or exercises), with detailed
  explanations of any wrong answers after the review table. Below 8, only
  the sections answered wrong are taught (slides mode reads only those
  slides, in the chat) and only their related exercises are required.
- Diagnostic mode now means "quiz first" as the suggested choice; its
  separate quiz is gone, so 8+ now skips the lesson.
- Learning-style descriptions (setup, teaching) say this explicitly.
- Validator guards for the new flow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… status)

- Save progress only after the learner has seen the content, feedback or result
- Paid exercises never wait for a mentor: free way, then an adapted version
  with free tools, and only then skip and flag; a free trial isn't a free way
- Hebrew learners type הבא / המשך / נתקעתי; no escape sequences in output;
  every reply stays in the learner's language
- Quizzes: Hebrew terms where options depend on them, no score before the
  free-text question, three-part explanations after a passed skip quiz,
  free-text graded by ideas rather than wording
- Lesson skip quiz only for a lesson not started; module skip quiz only before
  the module's first lesson starts, and only once; per-lesson module results
  guide the suggestion after a failed module quiz
- Status shows lessons by completion; skip-quiz scores don't count toward the
  average or review reminders
- Exercises keep their original numbers, no sample answer before answering,
  feedback judged by what the exercise asked
- Hook note tells "not started" from "learning started"; validator guards
  the new rules

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- learn.md: nothing after a save (no closing summary, which came out in
  English); no escape sequences in saved files; no HTML tags in chat;
  name the next lesson only from COURSE.md
- order.md: ignore a script's mention of lessons that aren't in the
  course; after the last lesson the next step is the final project
- teaching.md: take slide numbers from the script and check none was
  skipped before the last slide; "skip" question offers skipping one
  slide; thinking questions answerable from the material so far;
  reminders keep the exercise's own step numbers
- exercises.md / slides.md: save the planned exercises (full text for
  fresh ones) so a new conversation continues with the same exercises;
  in slides mode, save only after the last weak slide is shown
- stuck.md: try the smallest fix first; never turn off a security
  protection
- progress.md / status.md: no review suggestion from a skip quiz;
  "didn't pass" instead of "failed"
- also the fixes from the no-order manual test (2026-11-12), already in
  that branch: ask where to continue when returning to a lesson in
  progress, call sections "שקף" consistently, and resume.md says which
  part of the next lesson isn't complete
- validator: guards for all of the above

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The previous rule ("end the reply after the save") made replies end on a
tool call: the stuck flow once saved first and never showed its
explanation, and a reply with no text after the save made Claude Code ask
for visible output, so the question was repeated. Now: show everything
first, then save, then one closing line in the learner's language that
asks for the next step (never a summary, never empty).

resume.md: ignore a review date when the only quiz in the file is an
unlabeled skip quiz.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ing-support branch

Conflicts resolved so both sets of changes work together:
- Keep master's new commands (help, explain the code, summaries,
  english only), freshness check, one slide per message, optional
  lessons (רשות), [SLIDE TRANSITION], first-lesson project paragraph,
  exercise count up front, Stop-hook command and validator checks.
- Exercises stay required (this branch's rule): a learner can't skip an
  exercise by asking; only a paid exercise is skipped, after free ways
  and an adapted version. Master's "skip on request" lines removed.
- Status stays by completion (complete / in progress / not started),
  plus master's "Optional" category; quiz mastery stays extra info.
- Lesson order and the order hook skip optional lessons; the module
  skip quiz doesn't cover them. New hook tests for this.
- COURSE.md: master's lesson list (with 2.1, 2.2, 2.7-2.9) plus this
  branch's resource list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tests/test_hooks.py runs each hook the way Claude Code does (exec form,
UTF-8 JSON on stdin) against a fake course and a fake learner folder,
so real learner data is never touched. It covers the stuck hook and the
lesson-order hook, including optional lessons and the exercise plan.
It prints SKIPPED where powershell.exe isn't available.

validate.yml gets a second job on windows-latest that runs it, since
the hooks are Windows PowerShell. CLAUDE.md says how to run it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@noa-maurer

noa-maurer commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor Author

Handover notes: learning support from participant feedback

PR: #19
Alternative without lesson-order enforcement: https://github.com/noa-maurer/Tov-learn/tree/feat/feedback-learning-support-no-order

I'm available for review comments until 30/11/2026. After that, these notes and the PR description should be enough to continue without me.

Decisions for you

  1. Which version: this PR (lesson order enforced) or the no-order branch (any order, with a one-line reminder about unfinished lessons). The differences are listed in the PR description, under "The no-order alternative".
  2. The policy changes in the PR's "Policy changes to review" table, mainly:
    • all exercises required, with no skipping on request
    • status by completion
    • a skip-quiz pass mark of 8
    • the paid-tools flow, which doesn't wait for a mentor
  3. The resource list in courses/ai-dev/COURSE.md (## משאבים): please keep the rows up to date. Claude Code is listed as a course prerequisite (Pro plan or higher, as in the README); if API-key access is also accepted, say so there. Claude uses this list to decide whether an exercise needs a paid tool.
  4. The final-project proposal (in the PR description): preview the projects at any time, and start the project only after the course is complete.

Where things are

What Where
Exercise rules (tracking file, plan, paid-tools flow, flags) .claude/commands/learn/exercises.md
Lesson order (main version) .claude/commands/learn/order.md + hook .claude/scripts/check-lesson-order.ps1
Unfinished-lessons reminder (no-order version) order.md + hook .claude/scripts/check-unfinished-lessons.ps1
Stuck help .claude/commands/learn/stuck.md + hook .claude/scripts/detect-stuck.ps1
Skip quizzes (lesson and module) teaching.md Step 3 / 3B, slides.md Step 1B, quiz.md "Module Skip Quiz"
Status by completion .claude/commands/learn/status.md
General rules (saving order, Hebrew words, no escape sequences or HTML, next lesson from COURSE.md) .claude/commands/learn.md, at the top
Regression guards tests/validate_structure.py
Hook tests tests/test_hooks.py (CI: Windows job in .github/workflows/validate.yml)

What learners' folders now contain

In ~/skill-tutor-tutorials/progress/:

File What it is
exercises-lesson-X.Y.md each lesson's required count (**נדרשים:**), the planned exercises (## תוכנית), and every answer with its feedback
exercise-flags.md paid exercises that were skipped because neither a free way nor an adapted version worked, with what was tried. This is for you to review.
stuck-log.md every stuck moment: lesson, "understanding" or "not working", topic, resolved or not. A good source for the next feedback round.
module-X.md module skip-quiz results, per lesson

Together with master's content-issues.md, these are worth collecting from learners before each cohort.

How to test

  • Validator: run python tests/validate_structure.py. It should print PASSED. It checks that each rule's text is in place, not how Claude behaves.
  • Hook tests: run python tests/test_hooks.py (66 cases; 58 on the no-order branch). It runs each hook the way Claude Code does, with a fake course and a fake learner folder, so no real data is touched. It needs Windows, because the hooks are PowerShell; elsewhere it prints "SKIPPED". CI runs it on every PR in a new Windows job (.github/workflows/validate.yml). When you change a hook, add a test case for it.
  • Manual testing: back up ~/skill-tutor-tutorials first, or use a fresh learner. Testing writes real progress files.

Still open

  • No full retest after the last changes. The second manual run's fixes and the merge with Participant feedback fixes: tutor behaviour, mastery, docs, lesson numbering #17 and Five new lessons from participant feedback (0.5, 1.9, 2.7-2.9) #18 were checked only by the validator, the hook tests and a short recheck. A third run, or a check with a real learner, is recommended before relying on these rules. Areas to watch:
    • the exercise plan when a lesson is resumed in a new conversation
    • slide numbering
    • the "skip" question
    • thinking questions
    • the stuck flow trying the smallest fix first
  • Known minor issues:
    • in the stuck flow, the check question was once asked twice
    • live Hebrew is sometimes a literal translation
    • mixed text direction outside quiz options
  • The new hooks run only on Windows. Since the review fixes (5d2c133), they use the same shell form and command -v powershell ... || exit 0 guard as master's Stop hook, so on Mac/Linux they exit silently and order.md tells Claude to check the lesson order itself. On Windows they need Git Bash (Git for Windows); without it they show an error, like the Stop hook. Not yet checked live on a Mac or Linux.
  • Content findings for the maintainers: see the end of the PR description (VAT 17% → 18%, the Shannon answer key, the 2.6 exercise 2 wording, 0.1 exercises 2–3).

The feedback analysis tool

The participant feedback behind this PR was analysed with https://github.com/noa-maurer/tov-learn-feedback (Python, Google Sheets and Gemini). Its CLAUDE.md documents the pipeline and every decision. The participants' data has already been handed over to TovTech and deleted on my side.

To use it for the next cohort, you need:

  • your own Google Form and Sheet
  • a Google service account with access to the Sheet
  • a Gemini API key in a git-ignored .env

The Sheet ID is currently written in feedback_tool.py (SPREADSHEET_ID); moving it to .env is a planned improvement. Follow-up questions to participants are never sent automatically. The tool only writes them for a person to review.

@RazHadas RazHadas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks Noa, this is careful work: every rule has a validator guard, the hooks have real tests (and a Windows CI job), they fail open with exit 0, the BOM is there for PS 5.1, and the hook notes are worded as facts. The two manual runs and the no-order branch made this easy to review.

Please fix before merge

  1. New hooks break on Mac/Linux. master's Stop hook is guarded (command -v powershell >/dev/null 2>&1 || exit 0; ...), but the new UserPromptSubmit and PostToolUse hooks call powershell.exe directly in exec form. The README says learners can use Mac or Linux, and since the repo is public, many outside users will. There, every prompt and every Read would show a hook error, and the lesson-order rule would silently not exist, so the course policy would depend on the OS. Suggest the same guard as the Stop hook (shell form), or at least document the gap.

  2. Paid-exercise rule contradicts itself. We prefer your flow (free way, then adapted version, then skip + flag, never waiting for a mentor), especially because this is open source: someone using the course outside TovTech has no mentor to contact. But the new ## משאבים section in COURSE.md ends by quoting "עצרו ופנו למדריך", and the exercise files themselves still say that, so Claude reads both and gets opposite instructions. Please remove the quote from COURSE.md and add one line there saying exercises.md replaces the old instruction. Updating the exercise files themselves can be a follow-up. Along the same lines, the "Claude Code / לאישור" row could describe what a learner needs in general terms rather than what TovTech provides.

  3. The escape-sequence example lost its escape. In learn.md and quiz.md, the rule reads "escape sequences such as ‏ or ש". The second example is the literal letter ש (bytes D7 A9), probably an HTML entity like &#1513; that got converted along the way, which is exactly the bug the rule describes. Worth restoring the intended example inside the code span.

Open question for the maintainers

The strict-order version (blocking, "not even just this once") vs. the no-order branch is a product call, not a code issue, and we still need to decide it. Things to weigh: enforcement is prompt-only anyway (and missing on Mac/Linux, see 1), and the main feedback finding (skipped exercises) is solved in both versions. Also worth deciding: offering the skip quiz at the start of every lesson adds a question to every lesson start.

Minor

  • PostToolUse on every Read starts powershell.exe each time (roughly 0.3 to 1s cold start on PS 5.1). Not breaking, but it adds up over a lesson.
  • learn.md is always loaded and gains about six rules; some teaching.md sentences run five lines. Tighter wording would help both token cost and how well Claude follows the rules.
  • detect-stuck.ps1 matching "error" / "שגיאה" in pasted output: agree with your note, a follow-up is fine.
  • Agree with your recommendation of one more manual run on the merged branch (with #17 and #18) before relying on the rules.

Content findings

VAT 17% → 18% is a real fix; we'll take it in a separate PR. Thanks for flagging the others too.

…rule, escape example)

- Hooks: UserPromptSubmit and PostToolUse now use the same shell form and
  `command -v powershell ... || exit 0` guard as master's Stop hook, so they
  skip silently on Mac/Linux. PostToolUse starts PowerShell only when the
  read is a lesson script (`_script.txt`). order.md tells Claude to check the
  lesson order itself where the hook doesn't run.
- Paid exercises: COURSE.md no longer quotes "עצרו ופנו למדריך"; it points to
  the exercises.md rules, which now say they replace that instruction. The
  Claude Code row describes a course prerequisite instead of what TovTech
  provides, and the "לאישור" mark is gone.
- learn.md / quiz.md: the escape-sequence example is a literal escape again
  (it had been converted into the letter it encodes).
- Tests: test_hooks.py runs the exact settings.json commands through Git Bash,
  including a machine without PowerShell. validate_structure.py guards the
  hook guard, the Mac/Linux fallback, the paid-rule wording and the escape
  example. README and CLAUDE.md document the hook requirements per OS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
noa-maurer added a commit to noa-maurer/Tov-learn that referenced this pull request Nov 28, 2026
…rule, escape example)

Same fixes as on feat/feedback-learning-support:
- Hooks: UserPromptSubmit and PostToolUse (check-unfinished-lessons) use the
  shell form with master's `command -v powershell ... || exit 0` guard, so
  they skip silently on Mac/Linux; PostToolUse starts PowerShell only for a
  lesson-script read. order.md tells Claude to check unfinished lessons itself
  where the hook doesn't run.
- Paid exercises: COURSE.md points to the exercises.md rules instead of
  quoting "עצרו ופנו למדריך"; exercises.md says its rules replace that
  instruction; the Claude Code row is a course prerequisite, no "לאישור".
- learn.md / quiz.md: the escape-sequence example is a literal escape again.
- Tests and validator guards for all of the above; README and CLAUDE.md
  document the hook requirements per OS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@noa-maurer

Copy link
Copy Markdown
Contributor Author

Thank you for the careful review! All three "fix before merge" items are fixed on both branches (5d2c133 on this branch, 1b55433 on the no-order branch). The PR description is updated to match.

1. Hooks on Mac/Linux

  • UserPromptSubmit and PostToolUse now use the same shell form and guard as master's Stop hook (command -v powershell >/dev/null 2>&1 || exit 0; ...), so on Mac/Linux they exit silently.
  • order.md now tells Claude to check the earlier lessons' progress files itself when the hook doesn't run (the no-order branch does the same for its reminder). So the order rule exists on every OS: enforced by the hook on Windows, by the instructions elsewhere.
  • README "Requirements" lists all three hooks and what replaces each on Mac/Linux.
  • Known limit: on Windows, shell-form hooks run through Git Bash. Without Git for Windows they show an error, the same as master's Stop hook today. This is documented in the README.

2. Paid-exercise rule

  • The quote is removed from COURSE.md. In its place, one line says the exercises.md rules replace the old "עצרו ופנו למדריך" instruction. exercises.md says the same from its side, so Claude sees the precedence from both files.
  • The Claude Code row now describes a course prerequisite in general terms (a paid Claude plan, Pro or higher, as in the README), and "לאישור" is gone. If the course also accepts API-key access to Claude Code, that row should say so.
  • Updating the exercise files themselves (2.1, 2.2, 2.5) is left as the follow-up you suggested.

3. The escape-sequence example

  • Restored in learn.md (two places: the second example was hit by the same conversion) and in quiz.md. Each span is now the literal text backslash-u05E9, checked at byte level.
  • The cause was slightly different from an HTML entity: the escape sequence itself was decoded into the letter when the AI tool wrote the file. It happened again during the fix, so a validator guard now fails if learn.md or quiz.md has a code span holding a single Hebrew letter. Anyone editing these files with an AI tool should check the bytes after writing an escape sequence.

Minor

  • PowerShell on every Read: fixed with item 1. The command starts PowerShell only when the read is a lesson script (_script.txt); a test confirms other reads don't start it.

Testing

  • Validator passes on both branches. Hook tests: 58/58 and 50/50, including 7 new cases that run the exact commands from settings.json through Git Bash, and a machine without PowerShell, where both hooks must exit 0 with no output.
  • Live check in Claude Code on Windows 11 with Git Bash, with a test learner: "נתקעתי" opened the stuck flow, and starting lesson 2.4 with 2.1 and 2.2 not started produced the order note, after which Claude offered 2.1 instead of teaching 2.4.
  • Not checked live: Mac, Linux, and Windows without Git Bash (covered by the hook tests only). If anyone on the team has a Mac, a quick check would help: open the repo in Claude Code, type "נתקעתי", and start a lesson whose earlier lesson isn't complete. There should be no hook errors, and Claude should still offer the earlier lesson.

On the open product questions, some facts that may help:

  • Strict order vs. no-order: the required exercises, the paid-tool flow, the lesson skip quiz and the stuck help are identical in both branches, so the main finding is addressed either way. The difference is only whether an incomplete earlier lesson blocks (this branch) or gets a one-line reminder (no-order). In both, the hook only adds a factual note and Claude applies the rule, so the strict version depends on Claude following order.md; in the live check above it did.
  • The skip-quiz question at every lesson start: it's one question with two options ("learn" or "quiz first"). I chose it so that in every learning style, the learner can decide for each lesson separately whether to learn it or show they already know it, and I still recommend keeping it. If you find it too much, there are two lighter options: ask only at a module's first lesson, or ask only when the learner says they already know the material.

Not done in this PR (open for follow-ups):

  • Tighter wording in learn.md / teaching.md
  • detect-stuck.ps1 reacting to "error" / "שגיאה" in pasted output
  • Updating "עצרו ופנו למדריך" in the exercise files
  • One more full manual run on the merged branch. Only the live hook check above was done after the fixes.

I'll try to get to some of these before November 30, and I'll comment here with anything I finish. After that I won't have access to work on this, so whatever is left is for you, or anyone you choose, to pick up.

noa-maurer and others added 2 commits November 29, 2026 13:02
The paid-exercise lines in 2.1, 2.2 and 2.5 said "עצרו ופנו למדריך"; they now
say not to pay and to tell Claude, who suggests a free way or an adapted
version with the same learning goal (the exercises.md rules). The 429 tip in
2.2 now says to write "נתקעתי" instead of calling the mentor. COURSE.md no
longer says the old instruction still appears in exercise files, and the
validator fails if an exercise file says "פנו למדריך" / "קראו למדריך" again.
Follow-up suggested in the PR TovTechOrg#19 review.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
"error", "שגיאה", "bug", "באג" and "broken" now count only in the learner's
own words: fenced code blocks and lines that look like pasted output
(indented lines, tracebacks, SomethingError:, log levels, npm ERR!, shell
prompts) are ignored for them. Stuck phrases such as "נתקעתי" / "doesn't
work" still count anywhere. 8 new hook test cases. Follow-up from the
PR TovTechOrg#19 review.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
noa-maurer added a commit to noa-maurer/Tov-learn that referenced this pull request Nov 29, 2026
The paid-exercise lines in 2.1, 2.2 and 2.5 said "עצרו ופנו למדריך"; they now
say not to pay and to tell Claude, who suggests a free way or an adapted
version with the same learning goal (the exercises.md rules). The 429 tip in
2.2 now says to write "נתקעתי" instead of calling the mentor. COURSE.md no
longer says the old instruction still appears in exercise files, and the
validator fails if an exercise file says "פנו למדריך" / "קראו למדריך" again.
Follow-up suggested in the PR TovTechOrg#19 review.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
noa-maurer added a commit to noa-maurer/Tov-learn that referenced this pull request Nov 29, 2026
"error", "שגיאה", "bug", "באג" and "broken" now count only in the learner's
own words: fenced code blocks and lines that look like pasted output
(indented lines, tracebacks, SomethingError:, log levels, npm ERR!, shell
prompts) are ignored for them. Stuck phrases such as "נתקעתי" / "doesn't
work" still count anywhere. 8 new hook test cases. Follow-up from the
PR TovTechOrg#19 review.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@noa-maurer

Copy link
Copy Markdown
Contributor Author

Two of the follow-ups are now done, on both branches. The PR description is updated to match.

Exercise files no longer send the learner to a mentor (6629c48 / 1da1ea2)

  • The payment lines in 2.1_exercises.md, 2.2_exercises.md and 2.5_exercises.md now say: "אל תשלמו. כתבו את זה ל-Claude: הוא יציע דרך חינמית, ואם אין — גרסה מותאמת של התרגיל עם אותה מטרת למידה."
  • The tip for the 429 rate-limit error in 2.2 said "קראו למדריך"; it now says to write נתקעתי, which opens the stuck flow.
  • COURSE.md no longer says the old instruction still appears in the exercise files. The precedence sentence in exercises.md stays, for exercise files added later.
  • A validator guard fails if any exercise file says "פנו למדריך" or "קראו למדריך" again.

The stuck hook ignores error words inside pasted output (776bd0f / 85f62bf)

  • "error", "שגיאה", "bug", "באג" and "broken" now count only in the learner's own words. Fenced code blocks, and lines that look like pasted output (indented lines, tracebacks, SomethingError:, log levels, npm ERR!, shell prompts), are ignored for them.
  • Stuck phrases such as "נתקעתי" or "doesn't work" still count anywhere.
  • Trade-off: a paste with no words of the learner's own gives no note. Claude still sees the error, and the learner can type "נתקעתי".
  • 8 new hook test cases. Hook tests: 66/66 and 58/58; validator passes on both branches.

Not done, left for you: my work on this ends on November 30, and there isn't enough time left for these two:

  • Tighter wording in learn.md / teaching.md: rewording rules can change how Claude behaves, and there's no time left for the manual run below, which would show whether it did. Without that check, the change could do more harm than good. It's best done together with that run; the validator will flag any guarded phrase that disappears.
  • One more full manual run on the merged branch: the earlier runs took one to two weeks each.

@RazHadas RazHadas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks Noa, all three blocking items are fixed, and a couple of the minors too.

Checked

  1. Mac/Linux hooks: both new hooks now use the same shell form and command -v powershell ... || exit 0 guard as the Stop hook, and order.md tells Claude to check the order itself where the hook doesn't run. README and CLAUDE.md match.
  2. Paid-exercise rule: the quote is gone from COURSE.md, the replacement line is there, and the Claude Code row is now general ("Pro and above"). You also updated the exercise files themselves (2.1, 2.2, 2.5), which I had left for a follow-up. A repo-wide grep finds no remaining "contact the mentor" instruction.
  3. Escape example: learn.md and quiz.md now contain a literal \u05E9 in the code span, verified at byte level.
  • Minor, done: the order hook starts PowerShell only for _script.txt reads, and the stuck hook ignores error words inside fenced code and pasted output.

Ran locally on 776bd0f: validate_structure.py PASSED, test_hooks.py 66/66 (Windows, including the no-PowerShell cases). CI green.

One nit (I'll fix it after merge)

CLAUDE.md line 41 has a stray backslash: \Claude Code.

Approving. I'm running one more manual learner pass on the branch before merging, as we both recommended.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@RazHadas
RazHadas merged commit bac7e86 into TovTechOrg:master Nov 30, 2026
2 checks passed
@RazHadas

Copy link
Copy Markdown
Contributor

Merged. Thank you, Noa!

This PR turns the participant feedback into real course behaviour. The validator guards, the hook tests with a Windows CI job, the no-order branch and the handover notes will make it easy for us to keep going without you. Thanks also for fixing the exercise files themselves, not only the rule.

Manual run before merging

A fresh test learner (Hebrew), on 776bd0f:

  • Lesson order: asking for 2.4 first was refused, with the three ways forward from 0.1. Later, asking for 0.2 with the 0.1 exercises not done was refused as well.
  • Lesson start: "learn or quiz first" was offered, and the pass mark of 8 was explained.
  • Required exercises: "next" after the last slide didn't skip exercise 1. The exercise plan (נדרשים: 6 + ## תוכנית) was saved.
  • Stuck help:
    • "נתקעתי, לא הבנתי..." got an explanation from a new angle, then a check question, and was logged to stuck-log.md.
    • "The tokenizer site asks me to log in" got a free alternative first, with the adapted version mentioned as the next step.
  • Resume in a new conversation: "continue 0.1, 0 of 6 exercises recorded, next is exercise 1". A lesson skip quiz is correctly no longer offered once learning has started.

Small things we saw, for a follow-up (not blocking)

  • Slide numbering: the title slide was skipped, so slides 2-7 were shown as 1-6. Your check before the last slide caught it, and Claude corrected itself.
  • Partial exercise answer: a partial answer to exercise 1 got feedback but wasn't written to exercises-lesson-0.1.md yet. It's probably recorded once the exercise is complete; we'll check.

I also removed the stray backslash in CLAUDE.md (044956e) before merging. We'll take the VAT fix in a separate PR.

Good luck with what's next!

RazHadas added a commit that referenced this pull request Nov 30, 2026
VAT has been 18% since January 2025. Flagged in PR #19.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

2 participants