4.2 KiB
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 insyllabus.mdwhose "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)
- Read
CLAUDE.md,syllabus.md,progress.mdandreview.md. - If
progress.mdorreview.mdis missing, create it.progress.mdstarts with a# Progressheading.review.mdstarts with the table header described inCLAUDE.md. - Find the lesson to run. If the last
progress.mdentry lists open exercises under "Next", ask me whether to finish those first or start the next lesson. - 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.mdwhose "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:
- A short explanation, using the lesson's Bridge notes to relate it to Rust or OCaml.
- A GHCi experiment for me to run myself. Ask me to predict the result first.
- If my prediction was wrong, explain the difference.
- Check every example in
cabal replbefore showing it to me. - Skip what I clearly know already. If unsure, ask one quick question instead of explaining.
5. Exercises
Normal lessons:
- Create
src/Exercises/LessonNN.hs(two-digit lesson number) with the type signatures andundefinedstubs for the lesson's exercise list. - Create
test/Exercises/LessonNNSpec.hswith hspec tests for each exercise, including edge cases. - Add the new modules to the project's
.cabalfile. - Run
cabal testand confirm the tests fail because ofundefined, not because of compile errors.
Practice sessions:
- Create
src/AoC/YYYY/DayNN.hsfrom the solution template in the syllabus's Reference section, plus a spec file. - 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.
- 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.mddescribes. - 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.