Scaffold & Quiz¶
ZPD-inspired scaffolding and the Quiz protocol.
Scaffold Computation¶
compute_scaffold ¶
Compute scaffolding for a neuron based on Brain state.
Returns a Scaffold with: - level: how much support to provide - context: strong neighbor IDs (scaffolding material) - gaps: weak prerequisite IDs (should study first) - hints: auto-generated hints from neighbors
Quiz Protocol¶
The BaseQuiz protocol and its concrete implementations live in
spikuit-cli as of v0.6.3 — core is LLM-free and the grader-bound
quiz types belong with the CLI.
BaseQuiz ¶
Bases: ABC
Base class for every Quiz v2 type.
Subclasses implement front, back, grade, and optionally
preferred_mode / grade_choices_spec. They are constructed with
enough state to render themselves; selection, scheduling, and
persistence are the caller's concern.
back
abstractmethod
¶
Return the answer side — shown after flip or submit.
grade
abstractmethod
¶
Grade a response. Return QuizResult with needs_tutor_grading set to True if the quiz type cannot grade mechanically.
preferred_mode ¶
Preferred render mode. Override for audio/image quizzes.
grade_choices_spec ¶
Grade choices shown to the learner. Default: empty (quiz type provides its own grade input widget).
submit
async
¶
Record a response and release anyone waiting on submission.
wait_for_submit
async
¶
Block until a response is submitted via submit.