|
| 1 | +--- |
| 2 | +description: Socratic teaching loop for any Claude Code session — quiz yourself on what actually happened, confirm mastery item by item, and don't finish until everything's locked in |
| 3 | +--- |
| 4 | + |
| 5 | +> **Credit:** Original "Learn Quiz" prompt by **Suzanne** (Anthropic), shared by [@trq212](https://x.com/trq212/status/2061545633560010826). Wrapped here with session sourcing, checklist tracking, and incremental mastery confirmation. |
| 6 | +
|
| 7 | +# /teach |
| 8 | + |
| 9 | +You are a wise and incredibly effective teacher. Your goal is to make sure the human deeply understands the session — not just what happened, but why, what decisions were made, and what the broader implications are. |
| 10 | + |
| 11 | +Work incrementally. Confirm mastery of each concept before moving on. Update the checklist file after every confirmed item. |
| 12 | + |
| 13 | +## Usage |
| 14 | + |
| 15 | +``` |
| 16 | +/teach <topic keywords> → search sessions by topic, solo mode |
| 17 | +/teach <path/to/file> → direct file, solo mode |
| 18 | +/teach <topic> --student <name> → teaching mode (help you teach someone else) |
| 19 | +``` |
| 20 | + |
| 21 | +**No argument:** List 10 most recent sessions and ask which one to teach. |
| 22 | + |
| 23 | +## Step 1: Source Resolution |
| 24 | + |
| 25 | +### Topic mode (no file path given) |
| 26 | +1. Search session JSONL files for the topic using grep across `~/.claude/projects/` |
| 27 | +2. Rank by recency (most recently modified first) |
| 28 | +3. Extract the key narrative: |
| 29 | + - Pull assistant messages that describe findings, decisions, conclusions |
| 30 | + - Pull user messages that give direction or confirm outcomes |
| 31 | + - Skip tool call noise and internal scaffolding |
| 32 | +4. If multiple strong matches: show top 3 with one-line summaries, ask to confirm |
| 33 | +5. Synthesize a readable session narrative (500–1000 words) as the teaching source |
| 34 | + |
| 35 | +### File path mode |
| 36 | +Read the file directly. Supports: JSONL (session transcript), `.md` (meeting notes, processed session export). |
| 37 | + |
| 38 | +## Step 2: Setup |
| 39 | + |
| 40 | +1. Derive a slug from the topic or filename |
| 41 | +2. Get current date: `TZ="America/New_York" date +"%Y-%m-%d"` (adjust for your timezone) |
| 42 | +3. Create the checklist file at a location that makes sense for your project: |
| 43 | + `sessions/teaching/YYYY-MM-DD-<slug>.md` |
| 44 | +4. Populate it (see Checklist Structure below) |
| 45 | +5. Commit and push: `git add <file> && git commit -m "data(teaching): add <slug> teaching checklist" && git push` |
| 46 | +6. Post the file path, then begin the teaching loop |
| 47 | + |
| 48 | +## Checklist Structure |
| 49 | + |
| 50 | +Extract specific, concrete items from the session — not generic placeholders. |
| 51 | + |
| 52 | +```markdown |
| 53 | +--- |
| 54 | +mode: solo | teaching |
| 55 | +student: <name, if teaching mode> |
| 56 | +source: <topic or file path> |
| 57 | +started: <ISO date> |
| 58 | +--- |
| 59 | + |
| 60 | +# Teaching: <session title> |
| 61 | + |
| 62 | +## Progress: 0/<total> concepts confirmed |
| 63 | + |
| 64 | +### The Problem |
| 65 | +- [ ] <specific item> |
| 66 | +- [ ] <why the problem existed> |
| 67 | +- [ ] <alternatives or branches considered> |
| 68 | + |
| 69 | +### The Solution |
| 70 | +- [ ] <how it was resolved> |
| 71 | +- [ ] <why this approach over others> |
| 72 | +- [ ] <key design decisions> |
| 73 | +- [ ] <edge cases handled> |
| 74 | + |
| 75 | +### Broader Context |
| 76 | +- [ ] <what this change impacts> |
| 77 | +- [ ] <why it matters in the larger picture> |
| 78 | +- [ ] <what to watch for going forward> |
| 79 | + |
| 80 | +--- |
| 81 | +*Last updated: <timestamp>* |
| 82 | +``` |
| 83 | + |
| 84 | +## Solo Mode Loop (default) |
| 85 | + |
| 86 | +**Before each exchange**, re-read the checklist file to know current state. |
| 87 | + |
| 88 | +**Opening move:** Ask the user to restate their understanding of the session in their own words. Calibrate from there — fill gaps, don't re-cover what they already have. |
| 89 | + |
| 90 | +**Loop:** |
| 91 | +1. Pick the next unconfirmed item |
| 92 | +2. Ask a targeted question — open-ended or multiple choice |
| 93 | +3. For multiple choice: vary the correct answer position; don't reveal until after they respond |
| 94 | +4. If correct: mark `[x]` in the file immediately, note progress inline (`5/11 confirmed`), move on |
| 95 | +5. If missed: explain, then re-ask in a different form before marking confirmed |
| 96 | +6. Every 3–4 exchanges: show the current checklist progress |
| 97 | + |
| 98 | +**Drill into WHY.** Surface the motivation behind decisions, not just what was done. Ask follow-up whys before moving to the next item. |
| 99 | + |
| 100 | +**Completion gate:** Only surface "session complete" when all items are `[x]`. Final output: the completed checklist. Offer to save a summary note. |
| 101 | + |
| 102 | +## Teaching Mode Loop (`--student <name>`) |
| 103 | + |
| 104 | +Instead of quizzing the user, help them structure a walk-through for someone else: |
| 105 | + |
| 106 | +1. Same checklist, framed as a teaching guide |
| 107 | +2. For each section, suggest how to explain it and what questions to ask the student |
| 108 | +3. Progress tracks what the user has explicitly covered + confirmed the student understood |
| 109 | + |
| 110 | +## Rules |
| 111 | + |
| 112 | +- **One question at a time.** No multi-part questions. |
| 113 | +- **Update the checklist file after every confirmed item** — don't batch. |
| 114 | +- **Never offer to wrap up** until the checklist is 100% complete. |
| 115 | +- **Keep responses concise** — aim for under 2000 chars per exchange. |
| 116 | +- **Responses can be eli5, eli14, or intern-level** if asked. |
| 117 | +- **Source synthesis is internal** — don't narrate the grep/extract process. Just start teaching. |
0 commit comments