Introduction to learn
July 7, 2026 ยท View on GitHub
learn is a command-line study engine that turns your own material, a course, a certification,
or a stack of notes, into a runnable learning loop. It schedules reviews with spaced repetition,
generates retrieval practice from your own drafts, tracks the misconceptions behind your wrong
answers, gates readiness on prerequisites, and composes all of it into one study plan with a
single command. A second engine automates course and certification logistics and halts at every
graded step so the graded work stays yours. It is plain Node (version 20 or newer) with zero
external dependencies: clone it, run it, nothing to build.
Why it exists
Course platforms automate logistics (next module, next quiz, next certificate) but never tell you
whether you learned anything, and a generic AI tutor will hand you the answer if you ask twice.
learn is built to be neither: it structures real practice from your own attempts, refuses to
answer graded work, and writes a witnessed, re-checkable receipt that separates what the engine
did from what you did. A mastery claim from learn is never just the tool's word.
Core concepts
- Session. A named unit of study (
tutor plan <id>) with a topic and objectives. Objectives can be plain strings or{id, text, requires}objects;requiresbuilds a concept map and a topological learning path, and an objective stays locked until its prerequisites are mastered. - Attempt. One recorded practice answer (
tutor record): objective, prompt, your answer, whether you were right, and optional feedback on what went wrong. Attempts are the only input the mastery gate ever reads. - Due. The spaced-repetition view (
tutor due). By default an SM-2-lite/Leitner ladder over your practice log; opt in per session to an FSRS-class per-item model (--enable-fsrs, grades 0 to 4,--use-fsrs --desired-retention 0.9) that surfaces the item you are most likely to have forgotten. Either way, time is injected with--now, so schedules are deterministic. - Misconception. An aggregation of your wrong attempts and feedback per objective, ranked by count, used to steer the next plan toward where you are actually weak.
- Study plan.
tutor studycomposes due items, misconceptions, an interleaved practice order, prerequisite readiness, and the mastery verdict into one plan. - Mastery gate.
tutor masteryderives a ready/not-yet verdict per objective from your scored attempts only. Renders, visualizations, schedules, and pending predictions never move it. - Receipt.
tutor study-receiptemits a witnessed, hash-chained record of the session.tutor reverifyrecomputes that record's own evidence: the chain must recompute and the verdict must re-derive, with typed failures (CHAIN_BROKEN,VERDICT_MISMATCH) andUNVERIFIEDfor chainless receipts. - Workflow. For the credential engine: a declarative JSON list of steps (
navigate,click,fill,waitFor,capture,submit,assess,complete).learn runexecutes it and halts at everyassessstep, plus consent, CAPTCHA, payment, and account creation.
Your first ten minutes
From a clone of the repository:
node --test # 284 tests should pass
node src/cli.mjs doctor # every integrity line should read MATCH
Plan a session on something you are actually studying:
node src/cli.mjs tutor plan mysession --topic "derivatives" --objectives "power-rule,chain-rule"
# tutor plan mysession: 2 objective(s)
Record honest attempts, including a wrong one with feedback:
node src/cli.mjs tutor record mysession --objective power-rule \
--prompt "d/dx x^3" --answer "3x^2" --correct true
node src/cli.mjs tutor record mysession --objective chain-rule \
--prompt "d/dx sin(x^2)" --answer "cos(x^2)" --correct false --feedback "forgot inner derivative"
Ask for the plan:
node src/cli.mjs tutor study mysession --now 2026-06-30T00:00:00Z
# tutor study mysession: 0 due, 1 misconception(s), mastery not yet
# order: power-rule, chain-rule
# readiness: power-rule:unlocked, chain-rule:unlocked
node src/cli.mjs tutor misconceptions mysession
# tutor misconceptions mysession: 1 objective(s)
# chain-rule (1x): forgot inner derivative
Emit a receipt and re-verify it from its own evidence:
node src/cli.mjs tutor study-receipt mysession --now 2026-06-30T00:00:00Z
# verified true, mastery not yet -> tutor/mysession.study-receipt.json
node src/cli.mjs tutor reverify mysession
# tutor reverify mysession: VERIFIED (1 receipt(s))
Optionally, run the credential engine against the bundled example and watch it halt at the graded step with nothing actuated past it:
node src/cli.mjs run examples/course.json --id run1
# run run1: halted-assess @step 4
node src/cli.mjs resume run1 --attest "completed Quiz 1 myself"
Where to go next
- HOW-IT-WORKS.md: the full study loop step by step, including retrieval practice, predict-then-observe, and self-explanation.
- ARCHITECTURE.md: the witness/ledger/gate spine both engines are built from.
- ../USAGE.md: the complete CLI and MCP command reference.
- ENTERPRISE-READINESS.md: using
learninside unattended agent workflows with context envelopes and action receipts. - smoke.md: an operator-run smoke test against a live LMS.
- The README's feature list, for capabilities not walked through here: proof-packet lessons
(
tutor prooflesson), self-explanation (tutor explain), predictions (tutor predict/tutor score), and the assist pillar (learn assist) that flags claims to verify in your own draft and authors nothing.