Skip to content

Repository files navigation

my-flashcards

CI codecov Python License: MIT

The learn-loop's spaced-recall drilling step. Build a deck of flashcards from a document corpus, then drill the cards that are due — weakest topic first.

Unlike my-professor, only build calls the Engine; review and grade are instant and free, so a whole deck can be crammed rapidly. Cards roll up to their topic's mastery via the shared mythings.mastery seam, so the whole study cluster agrees on what "due" means.

Usage

# Build a deck for a topic from the corpus (the one Engine call)
myflashcards build "EM algorithm" --corpus ~/Desktop/unsupervised_learning.pdf \
  --engine claude --deck .mythings/em.toml --count 8

# Drill the cards that are due (front then back, weakest topic first) — no Engine call
myflashcards review --deck .mythings/em.toml --ledger .mythings/mastery.jsonl

# Record how a recall went (0.0 forgot .. 1.0 easy) — no Engine call
myflashcards grade "EM algorithm" --score 0.3 --ledger .mythings/mastery.jsonl

--engine noop (default) makes zero Engine calls and writes an empty deck (a soft failure). review --all shows every card regardless of schedule; --fronts-only hides the answers for self-testing.

How it works

  • build shortlists the corpus for the topic and makes one Engine call to write N front/back cards, grounded strictly in the shown excerpts. The deck is a human-editable local TOML file.
  • review orders the deck for a session: topics never reviewed first, then topics that are due (from mythings.mastery.due), weakest first.
  • grade appends a self-scored recall Attempt to the local mastery ledger — never a PR. A card's schedule is its topic's mastery; no second state format.

Install (development)

python -m venv .venv && source .venv/bin/activate
pip install -e ../my-things-core -e ".[dev]"
pytest

License

MIT — see LICENSE.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages