Anki export pipeline: knowledge graph → spaced-repetition decks
The skill file schema is already a flashcard schema, so card generation is a deterministic transform — no LLM in the loop. Six card types come out of the sections (concept, diagnostic, cue, edge, error, benchmark); the packager
The skill file schema is already a flashcard schema, so card generation is a deterministic transform — no LLM in the loop. Six card types come out of the sections (concept, diagnostic, cue, edge, error, benchmark); the packager defaults to the actionable three (diagnostic, edge, error) for 4,421 cards across 9 domains, since every coaching cue already rides on the back of its diagnostic.
Two invariants make the deck regenerable rather than one-shot:
- Note GUIDs are keyed on the question, not the whole card. Re-ingesting a
source and rewording an answer updates the note in place, so Anki review history and scheduling survive. Verified by rewording a Fix: line and diffing GUIDs — zero drift.
- New-card
duefollows a topological sort of graph.yaml, so Anki introduces
a skill only after its prerequisites. The DAG becomes the syllabus.
Parsing reuses app/src/lib/load-domains.ts — one parser, not two. Card text is HTML-escaped at extraction because the content is full of "<30%" / "<$1K MRR" that Anki would otherwise eat as malformed tags.
./scripts/anki.sh marketing → build/decks/edgecraft-marketing.apkg ./scripts/anki.sh all --types all
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>