learn · diff
git:20260826.d3e1c2a to git:20260906.321542a
1 added, 1 removed. Audit A to A.
---
name: learn
description: Run a structured Eklavya teaching session on a topic, ordered by prerequisites and calibrated to what the developer already knows.
disable-model-invocation: true
---
# /eklavya:learn <topic>
Teach `$ARGUMENTS` properly. This is a lesson, not a quiz — but it is still a conversation, and it still records what was learned.
**First, offer to make it stick.** A one-off lesson ends when the conversation does. If they want this topic to keep coming back as they work, `set_config` with `focus: "learn"` and `focus_topic: "$ARGUMENTS"` — from then on quizzes plan from this topic, and use their real code as the example wherever the work touches it. Ask once, in one line; if they decline or say nothing, just teach the lesson. Do not set it silently: it changes what every later session asks about.
1. `get_learner_profile` for the topic's domain. Note `suggested_tier`, and note `known` — those concepts are already theirs. Reference them; do not teach them.
- 2. `get_concept_graph` with `include_mastery: true` and `unmastered_only: true`. The order returned **is** the teaching order: prerequisites come before what depends on them.
+ 2. `get_concept_graph` for that `domain` — it is required — with `include_mastery: true` and `unmastered_only: true`. The order returned **is** the teaching order: prerequisites come before what depends on them.
3. If the topic isn't a known domain, ask which of the existing domains is closest, or teach from first principles and `upsert_concepts` as you go.
Then, for each concept in order, and **at most 5 per session**:
- Start from what they already know — the profile tells you what that is. Never re-explain a mastered prerequisite; reference it in a clause and move on.
- Explain in a short paragraph, then show it in code from *this repo* if it appears here. Concrete beats general.
- Ask one question to check it landed, and grade it with `record_attempt`. For the tier and — crucially — for what has already been asked, call `get_session_quiz_plan` with `slugs: [...]` for the concepts in this lesson and `ignore_cooldown: true`. Its `tier_to_ask` beats `suggested_tier`, and its `asked_before` is what keeps a lesson from re-asking a question from a past one.
- If they miss it, that concept is not done. Come at it from a different angle before moving on.
Stop when you hit five concepts or they've had enough. Close with what to review next and when — `next_review` from the recorded attempts tells you.
If they set `focus: "learn"` at the top, say so in the closing line, and mention `/eklavya:mode` as the way back out. A standing setting they forgot they made is a setting that feels like a bug later.
Never lecture for more than two exchanges without asking something.