Socratic learning

From lukoshkin/evangelist · View interactive version

Socratic learning is an AI agent skill from the GitHub repository lukoshkin/evangelist. Use when the user wants a structured, multi-session learning experience on a technical topic with persistent notes and progress tracking. Triggers include "let's learn X", "teach me X", "I want to study X", "I want to study/prepare for an interview on X", explicit /socratic-learning, "resume the lea

How to use this skill

Skill file

Socratic Learning

Run a structured, multi-session learning experience for the user. Ask Socratic questions, take their answers verbatim, fill gaps, write canonical examples in their preferred language, and track progress in a persistent notes corpus.

When to Use

Don't use for one-shot answers, casual questions, or reference lookups. This skill is for paced, persistent learning with a budget.

Operating Modes

Detect mode from ls and _session.md content:

| Mode | Detected by | What to do |

|---|---|---|

| Bootstrap | No INDEX.md in CWD | Brainstorm with user, then scaffold the corpus |

| Resume | INDEX.md and _session.md exist; no topic is ⏳ in INDEX | Read _session.md, propose continuing from the suggested-next |

| In-session | A topic is ⏳ in INDEX | Continue the protocol from where it left off (see _session.md open thread) |

Bootstrap Mode (first-time setup)

Brainstorm before scaffolding. Ask one question at a time:

  1. Topic / curriculum — what to learn (a single topic, or a list of related topics).
  2. Style — Lecture / Socratic / Mixed (default: mixed leaning Socratic).
  3. Language(s) for code examples — Python only / specific language / language-agnostic.
  4. Total time budget — e.g., 12h, 6h, "open-ended" (skip time tracking if open-ended).
  5. Initial topic ordering — does the user have a specific list (e.g., interview question list) that drives the curriculum?

Then scaffold:

Resume Mode

  1. Read _session.md. Note Open thread and Suggested next.
  2. State to user: "Resuming from <open thread>. <topic> is at <step>."
  3. Continue the protocol from there.

Session Protocol (per topic cycle)

A cycle is one topic, regardless of how many sessions it spans.

  1. Open — If topic file doesn't exist, copy _template.md to <dir>/<topic>.md and fill the front matter. Set Status: ⏳ in both topic file and INDEX.md. Ask one Socratic question. Include a code example if the topic warrants concrete grounding.
  2. Receive answer — User answers freely. No grading. Don't interrupt.
  3. Append + expand — Append to topic's ## Socratic Q&A log: **Q (date):** + **You:** (verbatim) + **Expansion:**. Expansion: affirm what was right, sharpen vague terms, add what was missed, bridge to theory.
  4. Theory fill — Write the topic's ## Theory section: definition, structure, when-to-apply, when-NOT-to-apply.
  5. Canonical example — Idiomatic code in the user's language. Optionally 1-2 variants if they sharpen contrast (class form vs callable form, etc.).
  6. Language considerations (optional) — Only when the topic's shape varies meaningfully across language families. Discuss the language property abstractly; don't show concrete syntax in another language unless the user explicitly opted in.
  7. Pattern hunt (optional, anchor topics only) — Find 1–3 real-code occurrences in a target codebase. Link each by file:line, judge as good fit / forced / misuse. Skip for non-anchor topics to stay in budget.
  8. Wrap — Update topic file: Status: ⏳ → ✅, set Time used. Update INDEX.md: status icon, total time used, remaining. Rewrite _session.md. If the HTML viewer was scaffolded (build_viewer.py exists at corpus root), run python3 build_viewer.py to re-render the topic and refresh index.html. Offer the user three next-move options: continue to next topic, sit with this one (questions / extra forms), or pause.

File Conventions

Directory layout

<corpus-root>/
├── INDEX.md
├── index.html          (generated — the actual clickable viewer, open this not INDEX.md)
├── _session.md
├── _template.md
├── _assets/style.css    (copied from this skill's assets/ if pandoc is available)
├── build_viewer.py       (copied from this skill's assets/ if pandoc is available)
├── 01-<block>/
│   ├── 00-overview.md
│   └── <topic>.md        (+ <topic>.html once build_viewer.py has run)
├── 02-<block>/
│   └── ...
└── ...

Numeric prefixes order blocks. Underscore-prefixed meta files sort to the top.

HTML viewer

build_viewer.py (copied verbatim from this skill's assets/) renders every topic .md to a sibling .html via pandoc --mathjax (so Kalman-filter-grade formulas and code blocks render properly instead of raw LaTeX/markdown source), and regenerates a root index.html from INDEX.md with status icons, a progress bar, and clickable links into each rendered topic. The .md files stay the source of truth — .html is a disposable render, regenerated by rerunning python3 build_viewer.py any time. Corpora scaffolded before this convention existed can adopt it the same way: copy the two asset files in, run the script once.

Standalone deep-dive HTML pages (hand-authored, not pandoc-rendered)

When a derivation grows beyond what belongs in a topic file's ## Theory section — a multi-step formula derivation, several worked numeric examples, anything the user explicitly asks to see "rendered" rather than as chat text — write it as its own hand-authored HTML page instead of stuffing it into the topic .md. Co-locate it in the same block directory as the topic it supports, name it descriptively (<subject>-math.html), and link it from the topic file's Theory section. It is not processed by build_viewer.py — it's a standalone artifact, edited directly.

Required boilerplate (get this wrong and math silently fails to render, or renders as raw LaTeX text):

`_template.md`

# <Topic name>

> One-line intent: what problem it solves.

**Time budget:** Xm · **Time used:** Ym · **Status:** 📋 / ⏳ / ✅

## Socratic Q&A log
## Theory
## Canonical example — <language>
## Language considerations (abstract)
## Pattern hunt
## Misuses & smells
## Related

`INDEX.md`

# <Track name> — curriculum

Legend: 📋 not started · ⏳ in progress · ✅ done

**Total budget:** Xh (Ym) · **Time used:** Wm · **Remaining:** Vm

## 1. <Block> (<budget>)
- 📋 [Topic 1](01-block/topic-1.md) — <budget>m
- ⏳ [Topic 2](01-block/topic-2.md) — <budget>m  *(anchor)*
- ✅ [Topic 3](01-block/topic-3.md) — <budget>m

...

**Last session:** see [`_session.md`](_session.md)

`_session.md`

# Last session — YYYY-MM-DD

**Covered:** <topic file(s)>
**Status change:** Topic 📋 → ✅
**Time spent this session:** Xm · **Total used:** Ym / Zm
**Open thread:** <one sentence — anything deferred or mid-step>
**Suggested next:** [<topic>](path/to/topic.md)

Style

Time Budget

INDEX.md carries the total; each topic file carries its slice. At Step 8 (Wrap), update both. Track approximate minutes; err slightly over to avoid overconfidence. If the budget is "open-ended," skip time tracking but keep status icons.

Common Mistakes

| Mistake | Fix |

|---|---|

| Dumping full topic sections into chat | Chat is the live teaching surface; highlight moves, link to file |

| 3 Socratic questions in one message | One question; let the user react |

| Skipping the affirm-before-correct move | Tires the user; hides what they got right |

| Status icons in INDEX.md ≠ topic file front-matter | Always update both at Wrap |

| Auto-committing | Never commit unless the user explicitly asks |

| Pattern hunt for every topic | Anchor topics only; stays within budget |

| Forgetting to update _session.md at Wrap | Without it, resume mode breaks next session |

| Telling the user to open INDEX.md/topic .md files directly | They render as plain text with dead links in a browser — point to index.html / <topic>.html instead |

| Forgetting to rerun build_viewer.py after Wrap | index.html and topic .html pages go stale relative to the .md source |

| Configuring only displayMath in a hand-authored math page | Every inline $x$ in prose renders as raw LaTeX text; declare inlineMath too |

| Floating MathJax CDN version (@3) in a hand-authored math page | Pin an exact version (@3.2.2) — unpinned tags are a CDN-compromise exposure |

Anti-patterns

Cross-references

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.