| name | study-pack |
| description | Generate complete learning material for the current project: architecture overview with diagram, deep-dive notes on every key file/concept/term, and an Anki deck (CSV + live AnkiConnect push). Built for interview prep on a vibe-coded project. Use when: 'study pack', 'lernset', 'create study material', 'interview prep', 'lernmaterial erstellen', 'make anki cards for this project', 'prep me for the interview'. |
Study Pack — Full Learning Material for a Project
Turns a project you vibe-coded into interview-ready learning material: you walk in knowing the architecture, the terms, and why every decision was made. Generates Obsidian notes (with an architecture diagram) AND an Anki deck.
When to reach for this vs. learn-project
learn-project = ONE knowledge note, conversational, "explain it to me."
study-pack = the full set for serious prep: architecture diagram + per-area deep-dives + concept/term notes + Anki cards. Use it when you have to be tested on the project.
The Flow
1. Investigate deeply (this is the foundation — be thorough)
Read the real code, not just the README. Build a complete mental model:
- Entrypoints, frameworks, runtime, build tooling
- Every significant module/file and what it's responsible for
- The core data flow and decision logic, traced step by step
- Every technical term and concept an interviewer might probe: the frameworks, the protocols (e.g. MCP, OAuth, SSE), the patterns, the libraries, the deployment model
- Decisions and trade-offs: why this library, why this structure, what the alternatives were
2. Explain it to the user first (the learning moment)
Before writing files, walk them through it conversationally — architecture, core logic, the key terms — and invite questions. This is where they actually learn. Only proceed once they've got the shape of it (or say "go ahead").
3. Generate the Obsidian material
Read config from ~/.learn-while-code/config.json. Write into {obsidian_vault}/{obsidian_folder}/:
{ProjectName}.md (top level) — the master knowledge note (same structure as learn-project: architecture, core logic step by step, tools/principles table, "Think About It")
{ProjectName} — Architecture.md (top level) — a Mermaid diagram of the system (components, data flow, external services) plus a 2-3 sentence walkthrough. Use a graph TD or flowchart block — Obsidian renders Mermaid natively.
- Concept/term notes in
Concepts/ — for every key term the interviewer might ask (MCP, SSE vs stdio, the specific framework, etc.): what it is, why it's used here, a WHY question + answer. Reuse existing concept notes where they match; create new ones for project-specific terms. Cross-link with [[wikilinks]].
- Run
syncAllIndexes() so the MOC links everything.
4. Generate the Anki deck
Build an AnkiCard[] list ({ front, back, tags }) covering:
- Term cards: front = term ("What is MCP stdio transport?"), back = concise answer
- Why cards: front = "Why does {project} use X instead of Y?", back = the trade-off
- Logic cards: front = "What happens in {project} when {scenario}?", back = the flow
- Tag every card with
learn-while-code, the project name, and the category
Then deliver via hooks/lib/anki.ts:
import { exportCsv, ankiReachable, pushToAnki } from "...hooks/lib/anki";
const csvPath = exportCsv(cards);
if (await ankiReachable()) {
const n = await pushToAnki(cards, "Cm24-Interview");
} else {
}
Use a project-specific deck name (e.g. Check24-Interview) so it's separate from daily review.
5. Report
List what was created: master note, architecture diagram, N concept notes, N Anki cards (and whether they were pushed live or exported to CSV). Tell the user:
- Open
{ProjectName} — Architecture.md in Obsidian for the visual
- Anki: cards are in deck X (or "import the CSV at {path}")
- Say
study later for spaced-repetition review of the concept notes
Anki Delivery — the three paths
| Path | When | How |
|---|
| CSV | Always generated | exportCsv(cards) → ~/.learn-while-code/anki-export.csv, import via Anki File > Import |
| Live (AnkiConnect) | Anki running + addon | pushToAnki(cards, deck) — cards appear instantly, no import step |
| .apkg | Sharing/backup | Out of scope for now; CSV covers import. Note it in TODO if needed. |
If Anki isn't running, don't fail — export the CSV and tell the user they can open Anki and re-run for the live push.
Progress Link (optional, when Anki is running)
readAnkiProgress(deck) reads how many times you've reviewed each card in Anki and returns front -> reps. The skill can surface this ("you've drilled the MCP cards 12x, but never reviewed the OAuth ones") — a bridge between Anki review and learn-while-code's view of what's weak. Best-effort; skip silently if Anki is closed.
Gotchas
- The architecture diagram must reflect the REAL code, not a generic template. Trace actual imports/calls.
- Term notes are for interview defense — cover the jargon an interviewer drills, with crisp answers.
- Anki cards: one fact per card, short backs. Don't dump paragraphs.
- Don't push to Anki without the CSV fallback — Anki may be closed.
- Match the user's language for explanations; keep technical terms in their canonical (usually English) form.