Cheat sheets

AI Tutors and Learning Tools

Trace mastery, ground every card in a source, plan paths and materials, and suggest words from your own corpus.

  • Concepts and terms
  • Tasks and commands
  • Annotated code
  • Diagrams
  • Comparisons
  • Defaults and numbers
  • Troubleshooting
  • Questions and tips

Source

What each project builds#

FactorStudy coachPath finderAutocomplete padMaterials planner
BuildsPractice page with review datesFeasible learning pathLocal writing padPacking list and shortages
RuntimeNode.js 22.18Python 3.10+Node 22.18Python 3.10+
InputDeck JSON and attempt eventsResources, goals, budgetCorpus of id and textParticipants, materials, inventory
Outputindex.html, progress.jsonlearning-map.html, path.jsonreport.html, vocabulary-model.jsonpacking-list.csv, shortages.json
Review loopDownload attempts JSON--decisions decisions.jsonDownload vocabulary-model.json--decisions decisions.json
LimitExact answer match onlySelf-reported progressOne next token, two of contextOne concurrent session

From source-grounded-study-coach/README.md, community-learning-path-finder/README.md, vocabulary-autocomplete-pad/README.md, workshop-materials-planner/README.md, solution/cli.ts, solution/main.ts

Run and grade#

CommandWhat it does
python3 scripts/project_test.py <project> --init <workspace>Makes a workspace. The first stage fails
python3 scripts/project_test.py <project> --stage 1 --path <workspace> --strictGrades one stage
python3 scripts/project_test.py <project> --all --solution --strictChecks the reference solution
node --experimental-strip-types main.ts --deck ./fixtures/deck.json --attempts ./fixtures/attempts.json --initial-date 2026-09-01 --date 2026-09-03 --out ./study-outputBuilds the practice page and schedule
python3 cli.py samples/input.json --output demo-outputRuns path finder or materials planner
node cli.ts sample.json outputTrains the pad and writes output/report.html
python main.pyRuns the simulated tutor efficacy study
npm run serveTutor web app on :8090

From source-grounded-study-coach/README.md, community-learning-path-finder/README.md, vocabulary-autocomplete-pad/README.md, workshop-materials-planner/README.md, 19.17 code/main.py, 19.17 code/ts/README.md

Defaults and numbers#

SettingDefaultNote
p_init0.2Prior knowledge
p_learn0.12Learn rate per practice
p_slip, p_guess0.10Guess is 0.15
master_threshold0.85Mastered concepts are skipped
Catalog size18Exact planner maximum
suggest limit5Allowed range 0..50
Planner compare[8, 12]Participant counts to compare
Study n_turns6010 learners in each arm

From 19.17 code/main.py, community-learning-path-finder/API.md, solution/main.ts, solution/cli.py

Errors and fixes#

SymptomCauseFix
"Canonical answer must occur in the evidence quote"Offsets miss the answerFix start and end in UTF-16 units
"Conflicting duplicate attempt ID"Same id, other contentGive each attempt a new id
"Proposal lacks verbatim answer evidence"Model quote is not in the sourceReject it. Keep the deck unchanged
"prerequisite cycle"Resources need each otherRemove one prerequisite edge
"stale progress"Input changed after exportRerun, then edit the new decisions
"complete prerequisites first"Progress skips a stepMark the prerequisites done first
"inconsistent conversion cycle"Two unit paths disagreeFix the conversion factors
"Unsupported model schema"schemaVersion is not 1Load a model with schema version 1

From solution/main.ts, solution/main.py, solution/main.ts, solution/main.py

One tutor turn#

1next_conceptwalk the DAG. Pick the first concept below 0.85whose prereqs are all mastered.2Difficulty0.3 plus 0.1 for each prerequisite.3Last actiona prereq scaffold subtracts 0.15. A hintsubtracts 0.08.4Learner answerscorrect with sigmoid of knowledge minusdifficulty.5socratic_policycorrect and above 0.8 givescelebrate_and_advance.6socratic_policycorrect gives reinforce_and_next_question. Wrongabove 0.5 gives hint.7socratic_policywrong at 0.5 or below givesscaffold_from_prereq.8bkt_updateupdate mastery, then add the learn step.

From 19.17 code/main.py, Lesson 19.17

BKT update#

p = BKTParams()p_init, p_learn, p_slip, p_guess
if correct:
num = mastery * (1 - p.p_slip)
denom = num + (1 - mastery) * p.p_guess
else:
num = mastery * p.p_slip
denom = num + (1 - mastery) * (1 - p.p_guess)
posterior = num / max(denom, 1e-6)
return posterior + (1 - posterior) * p.p_learnlearn transition

From 19.17 code/main.py

Study coach loop#

replaydownloadstoredeck.jsonsources and cardsstoreattempts.jsondated answersprocessvalidateDeckoffsets hold theanswerprocessbuildProgressbox and due per cardprocessexportPracticewrites the outputsclientindex.htmlreveal and recordstoreprogress.jsondue cardsreplaydownloadstoredeck.jsonsources and cardsstoreattempts.jsondated answersprocessvalidateDeckoffsets hold the answerprocessbuildProgressbox and due per cardprocessexportPracticewrites the outputsclientindex.htmlreveal and recordstoreprogress.jsondue cards

From solution/main.ts, source-grounded-study-coach/README.md

Project functions#

TaskCode
Grade one typed answergradeAnswer(deck, cardId, response)
List due cardsdueCards(progress, date)
Order prerequisitespath_for(index, target, completed=None)
Rank paths in a budgetrank_paths(index, goals, budget, completed=None)
Suggest a next wordsuggest(model: Model, prefix: string, history?: string[], limit?: number)
Load a saved modelimportModel(value: unknown)
Scale materialsscale(model, participants=None)
Find shortagesshortages(model, participants=None)

From solution/main.ts, community-learning-path-finder/API.md, vocabulary-autocomplete-pad/README.md, workshop-materials-planner/API.md

Rules in code#

Answer match
NFKC, lower case, trim, drop end punctuation. Then exact match.
Box
correct adds 1 up to 5. Wrong resets to 0.
Interval
2 ** (state.box - 1) days when correct. 1 day when wrong.
Path rank
most goals covered, then fewest minutes, then IDs.
Suggestion score
order * 1000000 + count. A longer history wins.
Consumables
quantity*participants.
Shared equipment
quantity*ceil(participants/share).
Unknown stock
unconvertible inventory leaves shortage unknown.

From solution/main.ts, community-learning-path-finder/API.md, solution/main.ts, workshop-materials-planner/API.md

Abbreviations#

BKT
Bayesian knowledge tracing. Mastery probability per concept.
FSRS
Free Spaced Repetition Scheduler. Better than SM-2.
DAG
concept graph with prerequisite edges.
COPPA
US law that restricts data from children under 13.
OER
open content attached to each curriculum node.

From Lesson 19.17, 19.17 code/ts/README.md

Questions#

What does the tutor do when asked for the answer?
It asks a leading question.
What proves the tutor works?
A pre/post test delta with 10 learners over two weeks.
Does the study coach judge essays?
No. It uses authored questions and exact matches.
Does a model card go into the deck?
No. It goes to card-proposal.json for review.
Does the planner guess glue volume?
No. It never infers density or package size.

From Lesson 19.17, source-grounded-study-coach/README.md, workshop-materials-planner/API.md

Tips#

  • Build a curriculum graph of 50-150 concept nodes.
  • Compare with a non-adaptive baseline on the same content.
  • Auto-delete memory after 1 year. Scope it by learner ID.
  • Pass the review date from the page to --date.
  • Keep a second set of examples for evaluation.
  • Reloading the practice page before download discards new attempts.

From Lesson 19.17, source-grounded-study-coach/README.md, community-learning-path-finder/README.md