Answer an inline question marker (?> or ?>>) in a lesson file. Locates the Nth marker of the given kind and writes the answer in-place. Use when /api/ask routes a user question.
Review the user's solution for one studyground exercise. Reads exercises/<name>/main.py, gives feedback, writes it to exercises/<name>/feedback.md and to a feedback block in the calling lesson.
Have a real first conversation with a new learner — open-ended, learner-led, not a survey. Let them tell you what they're after; follow up where it actually matters; when you have enough to draft something useful, offer to write the curriculum. Then on action=finalize, write tracks/<track>/curriculum.md.
Generate the next lesson in the current track. Reads progress.json, writes a new lesson file, updates progress. Use when the user is ready to advance.
Compact a lesson by folding answered ?> Q&A pairs into <details> blocks, so a re-read flows past them. Run after the user has worked through a lesson.
A persistent tutor / coordinator that the learner talks to ABOUT a course (not inside a single lesson). Knows the curriculum, what's done, what's pending, the materials, and recent btw threads. Discusses plan, pace, gaps, suggestions — does not write to lesson files itself; recommends actions the user can take with other skills.
Start a new learning track on a topic. Generates the first lesson under $STUDYGROUND_DIR/lessons/ and updates progress.json. Use when the user says "let's learn X" or invokes /studyground:learn.
Fold a side-chat conversation into a lesson as a ?>> btw block, anchored near the passage the user highlighted. Use when /api/save-thread is invoked.