Skip to documentation

TutorScript Syntax Reference

TutorScript is the JSON language MoFaCTS uses for instructional documents, learner actions, and production rules. Use this page to implement or inspect a TutorScript document, write a production, or trace the prompts that realize a SPARC turn. For a lesson controlled by an existing policy, start with the researcher setup guide.

On this page

SPARC runtime prompts

The selected policy controls the target and move. For a model call, SPARC combines instruction text with request data such as the authored rubric, selected target, actual question or support, and relevant learner evidence. A saved turn or eligible library match can supply content already generated. The links below open the exact code for the prompt text and its assembly at one application revision. Current dialogue adapter on main

Categorized SPARC prompts

KLI category prompts

The category composer adds the boundary and synthesis instructions to the selected composition, response format, and category blocks. Combined categories reuse the component blocks. Two combinations also have specialized text. Read the composer · Composition and response-format blocks

Category Prompt blocks
fact Fact
model Model
rule Rule
fact-rule Fact + rule
fact–rule guidance
fact-model Fact + model
model-rule Model + rule
Principle guidance
fact-model-rule Fact + model + rule
transfer guidance

Authored categories and their research basis

AutoTutor dialogue prompts

The opening problem is authored. AutoTutor scores the response against the authored expectations and misconceptions, then the progressive-scaffolding policy selects a move and supplies its prompt to the shared dialogue request builder. Scoring prompt · Progressive-scaffolding productions · Dialogue system and user prompt builders

  • Pump. Ask the learner to extend their explanation toward the selected target. Pump
  • Prompt. Ask one focused question about a specific missing idea or distinction. Prompt policy · Prompt move
  • Supported Prompt. Ask a focused question with an incomplete figure that supports inference. Generate a figure brief and preserve the omission in the image. Supported Prompt policy · Figure composition and sizing · Incomplete-figure image prompt
  • Hint. Provide a clue about the relevant relationship, condition, or distinction. Hint
  • Assertion. State the missing idea or correction and ask the learner to use or restate it. Assertion
  • Summary. Consolidate established ideas and any misconceptions addressed. Summary
  • Question deferral. Acknowledge a learner question and continue the selected scaffold without disclosing the intended answer. Question deferral
  • Off-topic redirection. Redirect an out-of-scope learner question to the current learning activity. Question scope refusal

The progressive-scaffolding policy selects ordinary Prompt. Supported Prompt is a separate entry in the move catalog with its own figure-generation adapter.

Shared prompt modifiers and administration

What TutorScript does

Three objects have different jobs:

Object Job
Production Defines eligibility in when, optional additional checks in tests, and effects in then.
Primitive action Performs an operation requested by a selected production, such as evaluation, feedback, instruction generation, or navigation.
Document node Represents something the learner can see or interact with, such as text, a figure-bearing tutor message, a question, or a button.

A production is not itself a primitive. Its then can update facts and invoke a registered action. An instructional action can compose several primitives into one move. A language model realizes the selected instruction; it does not replace the production's eligibility conditions or the selection mechanism.

For ordinary authored exercises, display.productionRules contains the executable rules. For AutoTutor and regular SPARC instruction, the runtime builds those same TutorScript rule objects from the selected policy. Authors select the controller and supply target content; they must not copy the runtime-owned rules into the lesson's productionRules. The worked production examples show these generated objects.

How the system selects a production

A matching rule plus its bound values is an activation. The engine selects an activation, executes its effects, updates the facts, and matches again. It tracks completed activations during that execution. Rules can bind the event identity so an assessment or decision applies to the submitted answer that produced it. This allows assessment, feedback, and instruction to run as dependent steps without one rule containing the entire sequence.

In regular SPARC instruction, the target policy first determines eligible targets and supplies facts that the move productions can match. The SPARC instructional cycle explains how the tutor starts, continues, or changes a target.

Agent selection and student selection

Agent selection

The SPARC agent uses a competitive selector to choose an eligible activation for the selected target. See Instructional moves and assistance for the calculation and Salience and deterministic execution for ordinary rule ordering.

Student selection

The student version uses the same evaluated evidence, target facts, and instructional primitives, but it does not sample the offered move using Boltzmann probabilities. A menu production invokes instruction.offer-menu with predefined options in its then. The selected option generates a choice-selected event. A corresponding production matches that option and target and invokes the instruction.

The runtime validates that the choice belongs to the outstanding menu and reuses the accepted assessment. See the student controls for what the learner can choose and the worked production for the matching rule.

A production written in TutorScript

Consider a model-rule target: the learner needs to apply a principle and understand the relationship that explains it. One eligible production requests an explanation, written support, and a text-response question. Its conditions require the correct point in the instructional cycle, an eligible target with that category, and no accepted decision for the same event. If the agent selects it, its effects save the decision, record the selected action, start the target cycle, and invoke generation.

The corresponding student-choice production matches an offered option rather than entering a probability competition. Both use the same move contract. A visual-support move has a different action identity; a written-support move does not choose an image merely because its name contains rich.

The worked production reference walks through the complete agent and student objects, including the conditions that bind the event and target together. The language reference below explains the reusable syntax.

What the selected production can create or change

An instructional production can generate a move with separately addressed document nodes. See Questions and instructional support for how a SPARC move composes and displays its elements.

Productions can also classify a response, assert a fact, change addressed node state, write a message, record model practice, or grow the document. Atomic nodes represent individual objects; groups organize them; semantic exercise nodes compile into concrete controls, response mappings, and correctness rules. The language reference lists these constructs.

Figures are represented by the generated instruction and its saved asset reference and accessible description. TutorScript does not require a production to contain drawing code or image bytes. See Images and video passages for instructional use and Shared instructional content library for curation.

State, evidence, and continuity

Working-memory facts are the evidence available to productions. Some are authored givens; others describe an interface event, an assessment, the active target cycle, a saved decision, or the result of an action. derivedFacts names intermediate inferences that later productions can reuse. Facts and document nodes have different roles: a retained decision does not have to become a visible widget.

initialState supplies the document's authored baseline. Replay applies saved state transitions and document operations to that baseline. Stable page and node identities keep references meaningful across responses and reopening. assert-fact with persistence records durable facts; identitySlots controls replacement of facts with the same declared identity.

For regular SPARC instruction, see assessment and feedback for how the tutor carries evidence forward and saving and resuming a lesson for the persistence checkpoints.

For ordinary model-linked exercises, model-practice resolves a model target and records practice evidence. This is distinct from merely recording credit for a KC. The two mechanisms are not interchangeable. The syntax for model references is below; database ownership, history authorization, and general resume loading belong in the Developer Reference Guide.

Editing production rules in the visual editor

Open the selected-node rule controls to begin. The following patterns apply to documents with author-supplied rules.

The visual editor’s Production Rules controls write the executable top-level productionRules array. They are for authored-rule SPARC documents. For an AutoTutor document, choose its instructional controller and author the targets; the runtime supplies its rules.

Build a response rule around the evidence you want to recognize and the feedback you want to provide:

Intended response Rule construction
Correct answer Test the input, classify it as correct, set node correctness, and send feedback. Add KC credit or model practice when appropriate.
Specific wrong answer Match the known answer and explain the particular error.
Other wrong answer Exclude all configured correct and specific-error matches before giving general feedback.
Misconception Match evidence for the misconception, classify it as buggy, and supply corrective feedback.
Hint request Match the hint action, send the hint, and record the relevant state.
Procedural step Check the step, assert any fact needed by the next step, update the display, and record practice.
Reveal or update Write state to the selected node or another explicitly addressed node.

Expressions use the language's literal, variable, and function objects. A formula must bind every referenced variable through its conditions. For example, a least-common-denominator test using lcm(d1, d2) first binds d1 and d2 from a problem fact. Fraction-addition rules can also use multiply(d1, d2) for a common-denominator product, add(d1, d2) to recognize the added-denominators error, multiply(n, divide(D, d)) for a converted numerator, addition for the converted numerator sum, and gcd in reduction. These expressions are represented as structured JSON, rather than executable formula text.

The TutorScript language reference defines the exact conditions, expressions, effects, model mappings, and progress-display options. Keep node IDs stable, check that every message points to the intended node, and ensure model-practice references resolve to actual clusters. Native controls already emit node actions; explicit SAI mappings are needed when a rule uses a custom selection name or path.

Language reference

Node, page, and effect examples in this section are fragments unless identified as complete production objects. The machine-readable authoring catalog and contract types are the implementation sources; runtime actions have a broader contract than the visual author's palette.

Documents and identity

SPARC TutorScript is a declarative document tree. Authors describe nodes, groups, layout intent, learner actions, and rules. The runtime renders and executes that document.

The enclosing setspec.sparcPages[].pageId is the single authored page identity. Runtime derives the neutral pageKey used in state addresses from that pageId; authors must not add a separate display.pageKey.

Top-level SPARC display fields commonly include:

Field Meaning
schema Schema name: tutorscript-sparc/2.0; standalone delivery supplies it when omitted and rejects a different authored value
unitType Author-facing kind of SPARC activity
layout Document layout, zones, and frontiers
nodes Authored document nodes
behavior SAI response mapping and step structure
initialState Authored baseline writes to addressed state cells before history replay
workingMemoryFacts Initial facts available to rules
productionRules Executable rule objects for authored-rule SPARC pages; omit for SPARC AutoTutor pages, whose selected controller policy supplies runtime-owned rules
clusterTargets Cluster-index mappings to shared model-practice identities
derivedFacts Fact-producing rules evaluated from working-memory conditions
instructionalController Explicit adapter and policy selection for runtime-owned instructional control
worksheet Fixed-question work and review durations and question-order randomization
progressReporter Optional request for document or sidebar model-progress display
response Scoring/evaluation metadata

Package-level page selection is documented under Stimulus Files. Nodes have stable ids:

{
  "id": "node-intro-paragraph",
  "nodeType": "group",
  "groupType": "text-panel",
  "placement": {
    "region": "chapterFlowBox",
    "order": 1
  },
  "children": [
    {
      "id": "node-intro-text",
      "nodeType": "atomic",
      "atomType": "text-block",
      "value": "In April 1775, tensions between British troops and colonial militia turned into open fighting."
    }
  ]
}

Nodes come in three forms: atomic nodes are individual visible or interactive objects; group nodes contain children; semantic nodes express a complete exercise that the compiler expands into concrete controls, response intents, and rules. Stable IDs connect nodes to state, feedback, and history.

Atomic nodes

Atomic nodes are single visible or interactive objects:

Atom type Purpose
html-block Sanitized rich HTML, including headings, emphasis, code, tables, images, iframes, OLI callouts, and diagnostics
simulation Packaged simulation with explicit observation bindings. Author a simulation node
text-block Plain text output
dialogue-utterance Learner or tutor message, with speaker, text, and optional turn/action/target metadata
message-box Rule-addressed feedback, hint, success, or buggy-message target
button Learner action button
text-input Single-line learner text or numeric input
dropdown Renderer-backed select-one input
select Additional select-one form recognized by the SPARC trial-display bridge
checkbox Boolean/select-many input
panel-selector Compact tab row that shows one panel at a time
skill-bar Static authored progress-style visual; it does not read adaptive model probabilities
learning-progress Model-backed adaptive progress reporter, rendered inline when placed as a SPARC node
operator Math/operator cell
header-cell Table-like header cell
text Inline plain text atom

Use html-block for rich content and dropdown for new select-one content. The renderer also recognizes the select form.

The renderer also recognizes fraction-box and fraction-input atoms. Adjacent numerator/denominator fraction atoms are normalized into a groupType: "fraction" pair before rendering. The source catalog exposes the fraction authoring pattern as a group entry; editor UI can still show numerator and denominator cells inside that group.

Groups

Groups are containers with child nodes. The current catalog includes renderer-supported groups and OLI-generated group patterns:

Group type Purpose
section Page or document section
dialogue-thread Ordered learner/tutor utterances
multiple-choice Prompt, answer-list, choices, and feedback
answer-list Vertical answer controls
targeted-cata Select-many exercise
checkbox-choice Checkbox plus label row
dropdown-exercise Dropdown-list exercise
dropdown-row Rich label plus dropdown
text-input-exercise Text-input-list exercise
text-input-row Single text-input answer row
short-answer Stem, text input, submit button, and feedback
choice-tabs Tabbed group showing one child panel
fraction Numerator-over-denominator fraction group
alternative-panel Panel content for tabbed or selector layouts
oli-group Generic converted OLI group

OLI-specific names such as oli-example, oli-learnbydoing, and oli-didigetthis identify purpose-labeled group variants. Converted OLI content uses the same SPARC document runtime.

Semantic exercises

Semantic nodes expand before rendering. Current forms are:

Semantic type Expansion
multiple-choice Prompt, answer list, button choices, and feedback
select-many Select-many group with checkbox choices and submission feedback
dropdown Dropdown exercise and answer rows
text-input Text-input exercise and answer rows
numeric-input Text-input exercise with numeric input mode
short-answer Stem, text input, submit button, and feedback

When an exercise supplies scoring/model metadata, its clusterIndex must resolve to the page's clusterTargets. The semantic compiler generates the matching response intents and executable correctness/model-practice rules. Do not maintain a second answer table.

Semantic multiple choice is the clean authoring form for multiple-choice questions:

{
  "id": "node-mc-problem",
  "nodeType": "semantic",
  "semanticType": "multiple-choice",
  "clusterIndex": 0,
  "label": "Multiple choice",
  "feedbackNodeId": "node-mc-feedback-message",
  "prompt": {
    "id": "node-mc-question",
    "value": "Which event marked the beginning of open fighting in the American Revolution?"
  },
  "answerGroupId": "node-mc-answers",
  "choices": [
    {
      "id": "node-choice-lexington-concord",
      "label": "Lexington and Concord",
      "value": "Lexington and Concord",
      "correct": true
    },
    {
      "id": "node-choice-bunker-hill",
      "label": "Bunker Hill",
      "value": "Bunker Hill"
    }
  ]
}

At runtime, that semantic node is expanded into a group with a prompt, an answer-list group, button children, and an optional header feedback message box. The semantic object is the authored content; the expanded group is the execution/rendering detail.

Converter-generated groups use the same node language; conversion and import procedures belong in Quick Start: Content Creation.

Layout and glue

The catalog exposes layout fields that document validation and the renderer already understand:

Field Allowed values
scrollAxis none, vertical
layoutMode document, stack, columns, sidebar, tabs
visualPreset assignment, chapter, section, practice-panel, feedback-panel, callout, control-panel
density compact, comfortable, spacious
wideContent constrain, reflow, shrink, stack
overflowX clip, hidden, visible

Renderer glue is stored under layout.glue.mode. Current modes include:

multiple-choice, answer-list, checkbox-list, dropdown-list, text-input-list, short-answer, inline-control, choice-tabs, intro-feedback, fill-in, term-column, and footer-actions.

Layout glue selects concrete rendering behavior; use one of the supported modes rather than an arbitrary label.

Allowed values do not imply every combination is valid. Width constraints require a wideContent policy; columns and sidebar require reflow or stack. Document validation checks layout and node references before execution.

Learner actions and production rules

SPARC behavior currently uses SAI-style response mapping:

{
  "behavior": {
    "schema": "sparc-behavior/1.0",
    "orderPolicy": "progressive",
    "responseFormalism": "SAI",
    "steps": [
      {
        "id": "answer-opening-multiple-choice",
        "responses": [
          {
            "selection": "choiceLexingtonConcord",
            "action": "ButtonPressed",
            "input": "Lexington and Concord",
            "nodeRef": "node-choice-lexington-concord"
          }
        ]
      }
    ]
  }
}

behavior.steps.responses maps learner actions on nodes into rule facts. Native SPARC controls can also emit direct node-id actions such as ButtonPressed, UpdateTextField, UpdateComboBox, and UpdateCheckbox; use explicit behavior mappings when authored rules need custom SAI names or path-specific selections.

For authored-rule SPARC pages, executable rules live in top-level productionRules, not in descriptive behavior.authoredProductionRules. Current runtime validation fails clearly when behavior.authoredProductionRules is present because that field is not executable. SPARC AutoTutor is the explicit exception: its generic controller productions are runtime-owned, and an AutoTutor display that supplies top-level productionRules is rejected instead of overriding the selected controller policy.

A production rule matches facts about learner actions, document state, or instructional state, binds variables, checks optional tests, and applies effects. Rules can classify an answer, give feedback, update model practice, grow the document, or select a tutoring move. reactiveRules and node-level visibleWhen/enabledWhen authoring have been removed; they are not current authoring mechanisms.

derivedFacts declares supporting facts computed from working-memory conditions. Each entry needs a stable id, when conditions, optional tests, and a fact template with a factType. The runtime validates these through the same production-rule machinery. They let authors name an intermediate inference once and use it in subsequent rules, instead of repeating the same conditions in every action rule.

A production rule has:

Field Meaning
id Stable rule id
module Optional rule grouping; the competitive runtime identifies instructional alternatives by its designated module
when Working-memory fact patterns
tests Optional comparisons after variables bind
then Effects to apply when the rule fires

Conditions and tests

Production rules match working-memory facts. A rule has when, optional tests, and then.

Allowed production-rule condition forms:

Condition Purpose
Fact pattern Match a fact by factType and optional slot patterns
Negated fact pattern (not) Match only when a fact pattern is absent
any Require at least one child condition to match
all Require every child condition to match

Allowed slot pattern forms:

Slot pattern Purpose
literal Require an exact value
bind Bind a slot value to a variable
bound Require a slot to match an already-bound variable
range Require a numeric value within optional inclusive/exclusive bounds; bounds may be expressions

Bind a variable before using bound or an expression that reads it. A range needs at least one bound. Bound slots and literal comparisons use exact equality. A range uses numeric conversion of the matched value.

Common generated OLI learner events use factType: "interface-event" with slots such as pageKey, selection, action, and input.

Tests run after fact patterns bind variables.

Allowed operators:

eq, neq, in, not-in, gt, gte, lt, lte, truthy, falsy, regex, and not-regex. truthy and falsy need only the left expression; comparisons and regular-expression tests use the right expression. in and not-in require an array on the right and compare values without type coercion. not-regex is the complement of regex.

For semantic-node scoring, an authored regex is the response matcher rather than an additional exact-answer requirement. Without a regex, acceptedValues supplies alternatives, followed by value, expected, or the input's expected answer. Generated default feedback excludes all authored response matchers, including regular expressions and accepted-value lists.

Allowed expression forms:

Expression Purpose
literal Fixed value
variable Bound variable reference
function Nested arithmetic function

Allowed functions:

add, subtract, multiply, divide, mod, gcd, and lcm.

Function arguments must be finite numbers. Subtract, divide, remainder, GCD, and LCM require two arguments. Divide and remainder reject zero as their second argument.

Effects and document growth

Supported production-rule effect types include:

Effect Purpose
invoke-action Call an explicitly registered runtime capability with an actionId and optional expression-valued args; exposed by runtime-owned rules, not the current visual palette
classify Mark the learner action as correct, incorrect, partial, study, skipped, unknown, or buggy
message Send hint, buggy, success, or feedback text to a target message node
write-state Write addressed node state
assert-fact Add a working-memory fact; persist and identitySlots control durable state and replacement identity
terminate-production-phase Stop the current production execution after this rule fires
history-event Record a rule-produced activity event with selection, action, input, optional outcome and values; at most one per rule
credit Credit a KC
model-practice Write adaptive model-practice history for a resolved model target
append-node Add or replace a node at a frontier/box
append-node-if-missing Add a node only if that id is not already present
append-text Append text to an existing text node
insert-node Insert a node before or after another top-level node

For ordinary correctness feedback, pair these effects:

  • classify records the outcome.
  • write-state with key correctness targets the learner-facing node and drives correct/incorrect highlighting.
  • message targets a message-box node and supplies the learner-facing feedback text.
  • credit records KC credit.

For progressive feedback, use append-node-if-missing once and then append-text:

[
  {
    "type": "append-node-if-missing",
    "frontier": "main",
    "boxId": "chapterFlowBox",
    "node": {
      "id": "node-remediation-feedback",
      "nodeType": "atomic",
      "atomType": "text-block",
      "placement": {
        "region": "chapterFlowBox"
      },
      "value": ""
    }
  },
  {
    "type": "append-text",
    "nodeId": "node-remediation-feedback",
    "separator": " ",
    "text": "Bunker Hill was an early major battle, but the war had already begun at Lexington and Concord."
  }
]

This creates one growing remediation paragraph instead of a new paragraph for every wrong answer.

Action arguments use the expression forms above. Actions run only after selection, and execution awaits their results before continuing. An unknown action is not an instruction to invent an implementation. The synchronous evaluator rejects action invocations; runtime capabilities require the action-aware execution path. Message effects can become replayed node-state writes; they are not inherently transient.

Model references and progress display

credit records knowledge-component (KC) credit. model-practice connects learner response evidence to the shared adaptive model and writes ordinary practice history. A KC is the concept or skill identified by the author for model tracking.

A model-practice effect resolves an explicit clusterIndex, or a node attached to exactly one cluster through clusterIndex/clusterIndices, against display-level clusterTargets. Missing mappings, duplicate indices, and ambiguous node attachments fail clearly. A node-only modelTarget does not replace the cluster attachment for a production-rule effect.

{
  "type": "model-practice",
  "outcome": "correct",
  "clusterIndex": 0,
  "nodeId": { "type": "variable", "name": "node" },
  "responseValue": { "type": "variable", "name": "input" },
  "input": { "type": "variable", "name": "input" }
}

The resolved display supplies the corresponding shared model identity. In standalone SPARC delivery, the unit engine constructs these mappings from the actual referenced lesson clusters. This fragment illustrates the resulting mapping:

{
  "clusterTargets": [
    {
      "clusterIndex": 0,
      "label": "Determine least common denominator",
      "stimuliSetId": "sparc-fractions-addition",
      "stimulusKC": "fractions.lcd",
      "clusterKC": "fractions.addition",
      "KCId": "fractions.lcd",
      "KCDefault": "fractions.lcd",
      "KCCluster": "fractions.addition"
    }
  ]
}

Keep these identities consistent with the lesson's actual clusters and model targets. They allow SPARC practice and ordinary card practice to use the shared model without treating screen nodes as separate model stimuli.

Model-backed progress has two authoring surfaces:

Surface Behavior
atomType: "learning-progress" Inline document progress chart; document placement is requested by the node itself
display.progressReporter Optional object with placement: "document" or "sidebar", plus optional nodeId, label, showReferenceLines, and compact

An inline learning-progress node requests document placement even without progressReporter. A sidebar request keeps the shared progress panel enabled. skill-bar is a static visual and does not read model probabilities.

AutoTutor instructional control

The runtime builds the production family from the lesson's instructionalController. Configure the AutoTutor policy and its required context, then supply the dialogue targets. The target-source facts learningTarget.source, diagnostic.misconceptionSource, and dialogue.moveContent are rejected for AutoTutor documents.

Authoring and implementation guides

Use Create and test a lesson to package and upload content, including the SPARC visual-editing workflow. TDF fields define lesson and unit settings; Stimulus files define page placement and media references. The Developer Reference Guide identifies the modules that implement document rendering, rule execution, and replay.

Special conditions and retained mechanisms

TutorScript also supports deterministic rule ordering, progressive scaffolding, and timed worksheets. Their behavior depends on the selected document or policy.

Salience and deterministic execution

Without a custom selector, the evaluator orders rules by descending salience (default zero), then by rule ID using localeCompare, and selects the first eligible activation. The optional numeric salience field therefore establishes priority for ordinary deterministic rules. Competitive selection uses its explicit selector and does not use salience as a probability weight.

The evaluator skips an activation it has already executed in the same run. A rule can end the current phase with terminate-production-phase. The ordinary evaluator defaults to a 25-cycle limit and reports a non-quiescent rule set if it reaches that bound without ending the phase.

Deterministic scaffolding

The progressive scaffolding policy supplies the deterministic dialogue rules, including the Pump-to-Prompt transition.

Timed worksheets

A worksheet defines fixed questions and separate work and review phases. Place worksheet inside the SPARC page's display and include 1 to 500 top-level semantic multiple-choice questions. Each question needs a distinct ID and a clusterIndex that resolves to a stimulus in the lesson. Both durations must be finite positive numbers in seconds. Set randomizeQuestions explicitly.

This complete stimulus file defines one question and its stimulus. In the TDF, set stimulusfile to the saved filename and select video-review with sparcsession.pageId or the video worksheet unit. The example gives learners 60 seconds to answer and 30 seconds to review.

{
  "setspec": {
    "clusters": [{
      "stims": [{
        "display": {
          "text": "Which planet is closest to the Sun?"
        },
        "response": {
          "correctResponse": "Mercury"
        }
      }]
    }],
    "sparcPages": [{
      "pageId": "video-review",
      "display": {
        "schema": "tutorscript-sparc/2.0",
        "worksheet": {
          "workDurationSeconds": 60,
          "reviewDurationSeconds": 30,
          "randomizeQuestions": false
        },
        "nodes": [{
          "id": "nearest-planet",
          "nodeType": "semantic",
          "semanticType": "multiple-choice",
          "clusterIndex": 0,
          "prompt": {
            "value": "Which planet is closest to the Sun?"
          },
          "choices": [
            {
              "id": "mercury",
              "label": "Mercury",
              "value": "Mercury",
              "correct": true
            },
            {
              "id": "venus",
              "label": "Venus",
              "value": "Venus"
            }
          ]
        }]
      }
    }]
  }
}

Work. Learners can select and change answers before the work deadline. Correctness appears during review. Submit and Continue closes work early. When work closes, the worksheet finishes pending answer writes and records each unanswered question as incorrect with an empty response. A reload after an interrupted close records only the omissions that still need saving.

Review. The review deadline is set after the work records have saved. The read-only view displays the latest saved answer, the correct answer, and correctness for each question. Unanswered questions display a blank for the learner's answer. Continue becomes available after the review view records its feedback appearance. Continuing or reaching the review deadline finishes the worksheet.

Resume. The attempt saves the original question order, phase, and deadline. Randomization changes question order once and preserves answer-choice order. Reopening uses the saved deadline for the current phase. If work expired while the page was closed, reopening finishes the work records and starts review. Reopening an existing review can record a new feedback appearance. A completed worksheet stays completed.

Keep question IDs stable for active learners. The server reads worksheet history by learner, lesson, unit, page, checkpoint, and course assignment when applicable. If more than 10,000 records match that scope, or the saved question order no longer matches the page, the worksheet reports a load error. Worksheet history and counts explains how answer changes, omissions, and lifecycle rows affect analysis.

For video delivery, follow Worksheet checkpoints. Worksheet controls use the interface language. Authored content keeps its own language.

Static displays and response timers

Production-rule SPARC documents own their interaction sequence and suppress the ordinary card response timeout. A static display does not acquire that behavior merely by containing nodes. Timed worksheets use their explicit work/review durations. General card timing belongs in Content Creation Reference Tables.