Files
2026-10-19 22:08:35 +02:00

4.2 KiB
Raw Permalink Blame History

name, description
name description
lesson Run the next session of my Haskell course from syllabus.md: review warm-up, teaching in small chunks, exercise stubs with tests, and wrap-up. Use when I type /lesson.

/lesson: run one Haskell course session

The course files are in the project root: syllabus.md (plan), progress.md (session log) and review.md (spaced repetition). The rules in CLAUDE.md always apply. The most important ones: never write exercise solutions unless I say "show solution", and never edit my solution code.

Arguments

  • /lesson: the next lesson, i.e. the first lesson in syllabus.md whose "Lesson complete" box isn't ticked.
  • /lesson <N>, e.g. /lesson 7: that lesson, including one I want to repeat.
  • /lesson wrap: go straight to the wrap-up for the current lesson.
  • /lesson review: only run the warm-up on items that are due.

1. Prepare (silently)

  1. Read CLAUDE.md, syllabus.md, progress.md and review.md.
  2. If progress.md or review.md is missing, create it. progress.md starts with a # Progress heading. review.md starts with the table header described in CLAUDE.md.
  3. Find the lesson to run. If the last progress.md entry lists open exercises under "Next", ask me whether to finish those first or start the next lesson.
  4. From Lesson 2 on, run cabal build. If it fails because of setup or config (not my exercise code), fix that first and tell me what you changed. If it fails because of my code, tell me which file is affected and let me decide.

2. Open the session

In 3–4 lines: what I did last time (from progress.md), today's lesson number and title, its goals, and the plan for the session.

3. Warm-up

  • Collect items in review.md whose "Next review" date is today or earlier. Take at most 5, oldest first.
  • Ask one question at a time and wait for my answer. Use short questions: predict a type or an output, or name the function to use.
  • Note for each item whether I answered well or poorly, for the wrap-up.
  • If nothing is due, say so in one line and continue.

4. Teach

  • Go through the lesson's Goals in small chunks. For each chunk:
    1. A short explanation, using the lesson's Bridge notes to relate it to Rust or OCaml.
    2. A GHCi experiment for me to run myself. Ask me to predict the result first.
    3. If my prediction was wrong, explain the difference.
  • Check every example in cabal repl before showing it to me.
  • Skip what I clearly know already. If unsure, ask one quick question instead of explaining.

5. Exercises

Normal lessons:

  1. Create src/Exercises/LessonNN.hs (two-digit lesson number) with the type signatures and undefined stubs for the lesson's exercise list.
  2. Create test/Exercises/LessonNNSpec.hs with hspec tests for each exercise, including edge cases.
  3. Add the new modules to the project's .cabal file.
  4. Run cabal test and confirm the tests fail because of undefined, not because of compile errors.

Practice sessions:

  1. Create src/AoC/YYYY/DayNN.hs from the solution template in the syllabus's Reference section, plus a spec file.
  2. Ask me to paste the example input and expected answers from the puzzle page, and turn them into tests. Don't fetch puzzle pages or inputs yourself.
  3. Remind me to save my own input as inputs/YYYY/DayNN.txt.

Then hand over: list the exercises and the command to run the tests. While I work:

  • Give hints only when I ask or when I'm clearly stuck, escalating one step per message as CLAUDE.md describes.
  • After an exercise's tests pass, show one idiomatic reference solution and briefly compare it with mine.
  • If I'm fast, offer one bonus exercise. If I'm struggling, add a simpler exercise first.

6. Wrap-up

Start when I say "wrap up", use /lesson wrap, or all exercises pass. Follow "Ending a session" in CLAUDE.md exactly. When updating review.md:

  • For each warm-up item: set "Last reviewed" to today, move to the next interval if I answered well or back to 1 if not, and recompute "Next review".
  • Add each new weak spot from this session with interval 1 and an example question.

Pace

A session is about 60–90 minutes. If it runs well past that, suggest stopping. Log the open exercises under "Next" in progress.md so the next /lesson picks them up.