formatv0

package
v0.18.44 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2026 License: Apache-2.0 Imports: 0 Imported by: 2 modules, 12 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package formatv0 holds the types of the module format, major version 0, generated from the schemas of version 0.4 in format/schemas by tools/types (R72 in spec's docs/decisions.md). There is a type for each schema and for each of its $defs, for each object at a place without a name of its own, and for each enumeration of a field. The schemas decide what is valid: a type gives the shape of a value alone, and code that reads a value from elsewhere checks it against its schema first. A field the object always holds is a value; any other is a pointer, a slice or a map, left out when nil, so that a value read and written again is the same JSON. The open view of each part is in the subpackage open.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgeCategory

type AgeCategory string

AgeCategory is the type of common.schema.json#/$defs/age_category.

An age category: under 13; from 13 to the age of digital consent in the learner's country; from that age to 18; 18 and over.

const (
	AgeCategoryUnder13         AgeCategory = "under_13"
	AgeCategoryFrom13ToConsent AgeCategory = "from_13_to_consent"
	AgeCategoryFromConsentTo18 AgeCategory = "from_consent_to_18"
	AgeCategoryAdult           AgeCategory = "adult"
)

The values of AgeCategory.

type AnchorSkillID

type AnchorSkillID string

AnchorSkillID is the type of module-index.schema.json#/$defs/anchor_skill_id.

The ID of an anchor skill, core.<name>, in the form of the shared taxonomy's IDs. The index takes the form and not the vocabulary itself, so that an entry stays valid after a later version of the format removes the anchor skill it names.

type AnswerSlot

type AnswerSlot struct {
	// Where and how the learner gives the answer on a handwriting sheet: anywhere on it, where AI
	// finds the final answer; the whole sheet, a work as a whole, such as an essay; in a zone of
	// it; or by choosing one of the options.
	Binding AnswerSlotBinding `json:"binding"`
	// The check of the answer slot: what is right in it, and how the platform tells. Closed, the
	// kind too: the learner's app does not get it.
	Check Check `json:"check"`
	// The zone of the sheet where the learner writes the answer.
	Zone *SheetRectangle `json:"zone,omitzero"`
	// The options the learner chooses from, in the order they are shown.
	Options []Text `json:"options,omitzero"`
}

AnswerSlot is the type of task.schema.json#/$defs/answer_slot.

An answer slot of an item on a handwriting sheet: its binding, the zone or the options that the binding needs, and its check.

type AnswerSlotBinding

type AnswerSlotBinding string

AnswerSlotBinding is the type of task.schema.json#/$defs/answer_slot/properties/binding.

Where and how the learner gives the answer on a handwriting sheet: anywhere on it, where AI finds the final answer; the whole sheet, a work as a whole, such as an essay; in a zone of it; or by choosing one of the options.

const (
	AnswerSlotBindingAnywhere AnswerSlotBinding = "anywhere"
	AnswerSlotBindingSheet    AnswerSlotBinding = "sheet"
	AnswerSlotBindingZone     AnswerSlotBinding = "zone"
	AnswerSlotBindingChoice   AnswerSlotBinding = "choice"
)

The values of AnswerSlotBinding.

type Attempt

type Attempt struct {
	// The seed of the attempt, whose place of randomness with the names template, the task's ID and
	// instance picks the instance.
	Seed Unsigned `json:"seed"`
	// The numbers of the instance: every parameter, every derived number and every result of the
	// solver of the template, by its name.
	Numbers Numbers `json:"numbers"`
	// The instance that the seed picks: the template with its numbers, the solver's results among
	// them, in the place of its placeholders, and without its template.
	Instance Task `json:"instance"`
	// The digest of the open view of the instance, as a sample of the eval protocol names the task
	// it answers: sha256: and the SHA-256 of the open view's canonical text, the instance's numbers
	// in place (section 25 of the format text; contracts/README.md, section 11).
	OpenViewDigest Digest `json:"open_view_digest"`
}

Attempt is the type of template-vector.schema.json#/$defs/attempt.

An attempt on the template: its seed, the instance that the seed picks, and the digest of that instance's open view.

type Audience

type Audience struct {
	// The age categories that the module suits. The platform offers the module only to learners in
	// one of them.
	AgeCategories []AgeCategory `json:"age_categories"`
	// The school grades that the module is written for. A module that names them asks the learner's
	// grade, and the answer may be one it does not name. Unlike the age categories, grades close
	// nothing: the module and its skills stay open to a learner of any grade.
	Grades []Grade `json:"grades,omitzero"`
}

Audience is the type of manifest.schema.json#/properties/audience.

Whom the module is for: its age categories and, for a module written for school grades, those grades.

type Author

type Author struct {
	// The name of an author: a person or an organization.
	Name Text `json:"name"`
}

Author is the type of manifest.schema.json#/properties/authors/items.

type Band

type Band struct {
	// The band's ID, by which a task names it.
	ID BandID `json:"id"`
	// What the band is called, in the module's explanation language: Grades 1–2.
	Title Text `json:"title"`
	// The school grades the band's tasks are written for, in a module that names grades: a learner
	// of one of them starts in this band.
	Grades []Grade `json:"grades,omitzero"`
}

Band is the type of manifest.schema.json#/properties/bands/items.

type BandID

type BandID LocalID

BandID is the type of common.schema.json#/$defs/band_id.

The ID of a band of the module's difficulty scale, of the form of a local ID and unique among its bands. A band is no entry of the module, and no full ID names it.

type BelowDraw

type BelowDraw struct {
	// The bound, from 1.
	Bound Unsigned `json:"bound"`
	// The integer, from 0 to the bound less one.
	Value Unsigned `json:"value"`
}

BelowDraw is the type of random-vector.schema.json#/$defs/draw/properties/below.

An integer below a bound.

type BetweenDraw

type BetweenDraw struct {
	// The least integer it may give.
	From Signed `json:"from"`
	// The greatest integer it may give.
	To Signed `json:"to"`
	// The integer.
	Value Signed `json:"value"`
}

BetweenDraw is the type of random-vector.schema.json#/$defs/draw/properties/between.

An integer between two, both included.

type CanonicalView

type CanonicalView struct {
	// The manifest, manifest.yaml. Its module_format_version names the version by which the whole
	// view is read.
	Manifest Manifest `json:"manifest"`
	// The skill graph, skill-graph.yaml, when the module has one.
	SkillGraph *SkillGraph `json:"skill_graph,omitzero"`
	// The tier of each skill of the skill graph, which section 12 computes from its prerequisites:
	// there when the module has a skill graph, and only then.
	SkillTiers SkillTiers `json:"skill_tiers,omitzero"`
	// The trap catalog, traps.yaml, when the module has one.
	Traps *Traps `json:"traps,omitzero"`
	// The technique catalog, techniques.yaml, when the module has one.
	Techniques *Techniques `json:"techniques,omitzero"`
	// The solving steps, solving-steps.yaml, when the module has them.
	SolvingSteps *SolvingSteps `json:"solving_steps,omitzero"`
	// The tasks of the module, when it has any, each under its local ID.
	Tasks map[TaskID]Task `json:"tasks,omitzero"`
	// The lessons of the module, when it has any, each under its local ID.
	Lessons map[LessonID]Lesson `json:"lessons,omitzero"`
	// The instances of the templates among the tasks, when there is one, each template's under its
	// local ID. The server picks the instance of an attempt among them and puts its numbers in the
	// place of the template's placeholders, and so runs no Starlark when an attempt begins.
	Instances map[TaskID][]Numbers `json:"instances,omitzero"`
}

CanonicalView is the type of canonical-view.schema.json.

The canonical view of a module, the server part of its package (section 25 of the format text): each part of the module as its file gives it, a part that a module has many of as an object by local ID, the tier of each skill, and the numbers of every instance of each template. module-kit builds it from the module's folder by the format version that the manifest names, and so does spec's CI for the vectors of packages; sim reads it by these types. No field of it is open: the learner's app gets the open view of a part from the server, never the canonical view.

type Canvas

type Canvas struct {
	// The canvas kind: a handwriting sheet, a free sheet of 1000 × 1400 units; or a workbook, lines
	// of items with boxes for the answers.
	Kind CanvasKind `json:"kind"`
	// The grid of a handwriting sheet: squares, lines or dots; squares unless given.
	//
	// Default: "squares".
	Grid *CanvasGrid `json:"grid,omitzero"`
	// The step of the grid of a handwriting sheet, in its units: 50 unless given.
	//
	// Default: 50.
	GridStep *int64 `json:"grid_step,omitzero"`
}

Canvas is the type of common.schema.json#/$defs/canvas.

A canvas: its kind, and the grid of a handwriting sheet.

type CanvasGrid

type CanvasGrid string

CanvasGrid is the type of common.schema.json#/$defs/canvas/properties/grid.

The grid of a handwriting sheet: squares, lines or dots; squares unless given.

const (
	CanvasGridSquares CanvasGrid = "squares"
	CanvasGridLines   CanvasGrid = "lines"
	CanvasGridDots    CanvasGrid = "dots"
)

The values of CanvasGrid.

type CanvasKind

type CanvasKind string

CanvasKind is the type of common.schema.json#/$defs/canvas/properties/kind.

The canvas kind: a handwriting sheet, a free sheet of 1000 × 1400 units; or a workbook, lines of items with boxes for the answers.

const (
	CanvasKindHandwritingSheet CanvasKind = "handwriting_sheet"
	CanvasKindWorkbook         CanvasKind = "workbook"
)

The values of CanvasKind.

type CanvasSettings

type CanvasSettings struct {
	// The height in px that a digit or a letter of the learner's writing has on the crop that goes
	// to be read: 24 unless given.
	//
	// Default: 24.
	DigitHeight *int64 `json:"digit_height,omitzero"`
}

CanvasSettings is the type of manifest.schema.json#/properties/canvas.

The settings of the module's canvas, the same for each of its tasks.

type Check

type Check struct {
	// The check kind: a number, a fraction, a choice, a time of day in hours and minutes, a
	// predicate on a whole number, or a rubric, which gives feedback and no verdict.
	Kind CheckKind `json:"kind"`
	// The right answer, as a string: a number for number, a simple fraction for fraction, one of
	// the options for choice, a time H:MM for time.
	Key *string `json:"key,omitzero"`
	// Of a number: the words that may follow it in the answer, as rungs in 7 rungs.
	Units []Text `json:"units,omitzero"`
	// Of a fraction: any fraction of the key's value is right, or only one in lowest terms; any
	// unless given.
	//
	// Default: "any".
	Form *CheckForm `json:"form,omitzero"`
	// Of a choice written by hand: the options the learner writes one of, such as the signs <, >
	// and =.
	Options []Text `json:"options,omitzero"`
	// Of a choice written by hand: what is in notation. options, unless given: the options alone.
	// word: the options, and any other value that is one word of letters, which gets not_yet; the
	// key is one such word, and the other options may be phrases.
	//
	// Default: "options".
	Notation *CheckNotation `json:"notation,omitzero"`
	// Of a number, a fraction, a choice or a time: the wrong values that the author knows, each
	// with the trap it shows, compared with the value read as the key is.
	TrapValues []TrapValue `json:"trap_values,omitzero"`
	// Of a predicate: a Starlark expression on value, the whole number read, that is True for every
	// right answer.
	Predicate *string `json:"predicate,omitzero"`
	// Of a rubric: what the work is given feedback by.
	Criteria []Criterion `json:"criteria,omitzero"`
}

Check is the type of task.schema.json#/$defs/check.

The check of an answer slot: its kind and the kind's parameters. Section 15 of the format text says how each kind reads the value and gives its verdict.

type CheckForm

type CheckForm string

CheckForm is the type of task.schema.json#/$defs/check/properties/form.

Of a fraction: any fraction of the key's value is right, or only one in lowest terms; any unless given.

const (
	CheckFormAny     CheckForm = "any"
	CheckFormReduced CheckForm = "reduced"
)

The values of CheckForm.

type CheckKind

type CheckKind string

CheckKind is the type of task.schema.json#/$defs/check/properties/kind.

The check kind: a number, a fraction, a choice, a time of day in hours and minutes, a predicate on a whole number, or a rubric, which gives feedback and no verdict.

const (
	CheckKindNumber    CheckKind = "number"
	CheckKindFraction  CheckKind = "fraction"
	CheckKindChoice    CheckKind = "choice"
	CheckKindTime      CheckKind = "time"
	CheckKindPredicate CheckKind = "predicate"
	CheckKindRubric    CheckKind = "rubric"
)

The values of CheckKind.

type CheckNotation added in v0.10.0

type CheckNotation string

CheckNotation is the type of task.schema.json#/$defs/check/properties/notation.

Of a choice written by hand: what is in notation. options, unless given: the options alone. word: the options, and any other value that is one word of letters, which gets not_yet; the key is one such word, and the other options may be phrases.

const (
	CheckNotationOptions CheckNotation = "options"
	CheckNotationWord    CheckNotation = "word"
)

The values of CheckNotation.

type ChosenCheck

type ChosenCheck = Check

ChosenCheck is the type of task.schema.json#/$defs/chosen_check.

The check of a choice by tapping: its options are the answer slot's, and the check holds none, nor a notation.

type Criterion

type Criterion struct {
	// The criterion, in the module's explanation language.
	Text Text `json:"text"`
}

Criterion is the type of task.schema.json#/$defs/criterion.

A criterion of a rubric: one thing the work is given feedback by.

type DemoFill added in v0.10.0

type DemoFill struct {
	// The line, by its place among the example's lines, from 1.
	Line int64 `json:"line"`
	// The box, by its place among the boxes of the line, from 1.
	Box int64 `json:"box"`
}

DemoFill is the type of lesson.schema.json#/$defs/demo_fill.

A box of a worked example's lines, by its line and its place in it.

type DemoPart

type DemoPart struct {
	// A paragraph of the demo, as plain text.
	Text *Text `json:"text,omitzero"`
	// A picture of the demo, by its path from media/.
	Picture *PicturePath `json:"picture,omitzero"`
	// What the picture shows, in words: a screen reader reads it, and it stands in the picture's
	// place until the picture comes. Empty for a picture that only decorates.
	Alt *string `json:"alt,omitzero"`
	// The width that a picture beside the sheet is shown at, in CSS px.
	Width *int64 `json:"width,omitzero"`
	// The height that a picture beside the sheet is shown at, in CSS px, in proportion to its
	// width.
	Height *int64 `json:"height,omitzero"`
	// The area of the sheet that a picture on the sheet is shown in, at its size, on the canvas
	// layer of the author's demo.
	Area *SheetRectangle `json:"area,omitzero"`
	// Of a worked example on a workbook: the box that this part of the demo fills with its value.
	Fill *DemoFill `json:"fill,omitzero"`
}

DemoPart is the type of lesson.schema.json#/$defs/demo_part.

A part of the author's demo: a paragraph; a picture beside the sheet, with what it shows and its size; a picture on the sheet, with what it shows and its area; or, on a workbook, a box filled.

type Descriptor

type Descriptor struct {
	// The digest of the bytes.
	Digest Digest `json:"digest"`
	// How many bytes there are.
	Size int64 `json:"size"`
}

Descriptor is the type of inventory.schema.json#/$defs/descriptor.

What names bytes of a package: their digest and their size.

type DeviceListing

type DeviceListing struct {
	// LICENSE, the text of the module's license.
	License Descriptor `json:"license"`
	// NOTICE, the notices of the licenses, when the module has one.
	Notice *Descriptor `json:"notice,omitzero"`
	// The files of media/, when the module has any, each by its path from media/.
	Media map[MediaPath]Descriptor `json:"media,omitzero"`
}

DeviceListing is the type of inventory.schema.json#/$defs/device_listing.

The listing of a package's device part, device.json: every file of it, each named by its digest and size.

type Digest

type Digest string

Digest is the type of inventory.schema.json#/$defs/digest.

A digest: sha256: and the SHA-256 of the bytes, in 64 lowercase hexadecimal digits.

type Domain

type Domain struct {
	// The least integer that the parameter takes.
	From int64 `json:"from"`
	// The greatest integer that the parameter takes. A domain whose to is below its from is empty,
	// and its template has no instance.
	To int64 `json:"to"`
}

Domain is the type of task.schema.json#/$defs/domain.

The integers that a parameter takes, from from to to, both included.

type Draw

type Draw struct {
	// The next integer of the stream.
	Integer *IntegerDraw `json:"integer,omitzero"`
	// An integer below a bound.
	Below *BelowDraw `json:"below,omitzero"`
	// An integer between two, both included.
	Between *BetweenDraw `json:"between,omitzero"`
	// A number from 0 up to 1, never 1.
	Fraction *FractionDraw `json:"fraction,omitzero"`
	// An order of the integers from 0 up to a count.
	Permutation *PermutationDraw `json:"permutation,omitzero"`
}

Draw is the type of random-vector.schema.json#/$defs/draw.

A function called on the stream, by its one field, with its arguments and the value it gives.

type Entry

type Entry struct {
	// The format version that the package's inventory names, by which the package is read. It
	// stands in every entry in every version of the format, so that a reader finds it before it
	// reads the package.
	ModuleFormatVersion ModuleFormatVersion `json:"module_format_version"`
	// The digest of the version's package: the digest of the canonical text of its inventory
	// (section 25).
	PackageDigest Digest `json:"package_digest"`
	// The tag of the release of modules whose files hold the package: the release that first
	// published it.
	Release Release `json:"release"`
	// The anchor skills that the skills of the version's skill graph teach, each once, in the order
	// of the code units of their IDs. A version whose skills teach none leaves this field out.
	Teaches []AnchorSkillID `json:"teaches,omitzero"`
	// When a release has withdrawn the version from publication, the reason of the withdrawal. It
	// stays in every later index, with the same reason.
	Withdrawn *WithdrawalReason `json:"withdrawn,omitzero"`
}

Entry is the type of module-index.schema.json#/$defs/entry.

What the index says of one published version of a module.

type ExampleLine added in v0.10.0

type ExampleLine struct {
	// The pieces of the line, in order, a box among them at least.
	Line []ExampleLinePart `json:"line"`
}

ExampleLine is the type of lesson.schema.json#/$defs/example_line.

A line of a worked example on a workbook.

type ExampleLinePart added in v0.10.0

type ExampleLinePart struct {
	// A piece of text of the line.
	Text *Text `json:"text,omitzero"`
	// A box of the line.
	Binding *string `json:"binding,omitzero"`
	// Of a box: what the demo writes in it when a part fills it.
	Value *Text `json:"value,omitzero"`
}

ExampleLinePart is the type of lesson.schema.json#/$defs/example_line_part.

A piece of a line of a worked example: a piece of text, or a box with what the demo writes in it.

type ExplanationPart added in v0.10.0

type ExplanationPart struct {
	// A paragraph, as plain text.
	Text *Text `json:"text,omitzero"`
	// A picture, by its path from media/: a lesson has no template, so its path holds no
	// placeholder.
	Picture *PicturePath `json:"picture,omitzero"`
	// What the picture shows, in words: a screen reader reads it, and it stands in the picture's
	// place until the picture comes. Empty for a picture that only decorates.
	Alt *string `json:"alt,omitzero"`
	// The width the picture is shown at, in CSS px; narrower when the text it stands in is.
	Width *int64 `json:"width,omitzero"`
	// The height the picture is shown at, in CSS px, in proportion to its width.
	Height *int64 `json:"height,omitzero"`
	// A numbered list: its texts in order, such as the steps of a method, each a short text that
	// does not begin with a number of its own, as 1. or 1) does. The learner's app draws the
	// numbers, so the leak check reads none of them; it searches the texts as it searches the
	// paragraphs.
	NumberedList []Text `json:"numbered_list,omitzero"`
}

ExplanationPart is the type of lesson.schema.json#/$defs/explanation_part.

A part of an explanation: a numbered list, or a paragraph or a picture with what it shows and its size, as a part of a task's statement is; a lesson's picture path holds no placeholder.

type FractionDraw

type FractionDraw struct {
	// The number: a multiple of 2^-53, which a double holds exactly and which a reader compares as
	// a double.
	Value float64 `json:"value"`
}

FractionDraw is the type of random-vector.schema.json#/$defs/draw/properties/fraction.

A number from 0 up to 1, never 1.

type Grade

type Grade int64

Grade is the type of common.schema.json#/$defs/grade.

A school grade, from 1 to 12, as the module's author counts them: the platform does not map the grades of one country to another's.

type IndexVector

type IndexVector struct {
	// The index of the release before this one. The first release of modules has none, and leaves
	// this field out.
	Previous *ModuleIndex `json:"previous,omitzero"`
	// The tag of this release, which a new entry names.
	Release Release `json:"release"`
	// The versions that the release withdraws from publication, by module ID and version. A release
	// that withdraws none leaves this field out.
	Withdrawals Withdrawals `json:"withdrawals,omitzero"`
	// The index that the release builds, when it builds one.
	Index *ModuleIndex `json:"index,omitzero"`
	// The rule of the index by which the build is refused, when it is: the case breaks that rule
	// and no other.
	Refusal *IndexVectorRefusal `json:"refusal,omitzero"`
}

IndexVector is the type of index-vector.schema.json.

A release of modules that a test vector of the module index gives, index.yaml beside the modules/ it releases (sections 9 and 26 of the format text): the index of the release before it, the release's tag and its withdrawals, and either the index that the release builds or the rule of the index by which the build is refused. An implementation builds the package of each module and the index, and gets exactly these, whatever the order of keys.

type IndexVectorRefusal

type IndexVectorRefusal string

IndexVectorRefusal is the type of index-vector.schema.json#/properties/refusal.

The rule of the index by which the build is refused, when it is: the case breaks that rule and no other.

const (
	IndexVectorRefusalModuleIndexEntriesKept      IndexVectorRefusal = "module-index.entries-kept"
	IndexVectorRefusalModuleIndexOnePackage       IndexVectorRefusal = "module-index.one-package"
	IndexVectorRefusalModuleIndexKnownWithdrawals IndexVectorRefusal = "module-index.known-withdrawals"
	IndexVectorRefusalModuleIndexVersionAbove     IndexVectorRefusal = "module-index.version-above"
)

The values of IndexVectorRefusal.

type IntegerDraw

type IntegerDraw struct {
	// The integer.
	Value Unsigned `json:"value"`
}

IntegerDraw is the type of random-vector.schema.json#/$defs/draw/properties/integer.

The next integer of the stream.

type Inventory

type Inventory struct {
	// The format version that the module's manifest names, by which the package is read. It stands
	// at the root of the inventory in every version of the format, so that a reader finds it before
	// it knows how to read the rest.
	ModuleFormatVersion ModuleFormatVersion `json:"module_format_version"`
	// The module's ID, as its manifest names it.
	ID ModuleID `json:"id"`
	// The module's version, as its manifest names it.
	Version ModuleVersion `json:"version"`
	// The server part, server.json: the canonical text of the canonical view.
	ServerPart Descriptor `json:"server_part"`
	// The device part, by its listing, device.json: the canonical text of the listing of its files.
	DevicePart Descriptor `json:"device_part"`
}

Inventory is the type of inventory.schema.json.

The inventory of a module's package, inventory.json (section 25 of the format text): the module's format version, ID and version, and the digest and size of each of the package's two parts — the server part, which is the canonical view, and the device part, which a listing of its files names. The digest of the package is the digest of its inventory.

type Item

type Item struct {
	// What the item asks, on a handwriting sheet, beside its answer slots: a) or a question.
	Text *Text `json:"text,omitzero"`
	// The answer slots of an item on a handwriting sheet, each named by its place in the item, from
	// 1.
	AnswerSlots []AnswerSlot `json:"answer_slots,omitzero"`
	// An item of a workbook: pieces of text and boxes in order, as 7 × [ ] = 56, and at least one
	// box. Its boxes are its answer slots, each named by its place among them, from 1.
	Line []LinePart `json:"line,omitzero"`
	// The skills that this item trains and needs, in place of the task's.
	Skills *Skills `json:"skills,omitzero"`
	// A similar case, simpler than the item, that the learner reads at the third rung of the hint
	// ladder when the tutor's words do not come.
	SimplerCase *Text `json:"simpler_case,omitzero"`
}

Item is the type of task.schema.json#/$defs/item.

An item of the task: on a handwriting sheet, its answer slots and what it asks; on a workbook, a line of text and boxes.

type LanguageTag

type LanguageTag string

LanguageTag is the type of common.schema.json#/$defs/language_tag.

A language as a BCP 47 tag (RFC 5646) of a language subtag, an optional script and an optional region, each in the letter case of the registry: en, zh-Hans, pt-BR, es-419. Written in quotes when it is no, which YAML 1.1 reads as false.

type Languages

type Languages struct {
	// The explanation language: the one language in which the module explains and the tutor speaks
	// with the learner. Every text of the module is in it, except the material of a language
	// module, which is in its target language.
	Explanation LanguageTag `json:"explanation"`
	// The target language: the one that a language module teaches. Other modules have none.
	Target *LanguageTag `json:"target,omitzero"`
}

Languages is the type of manifest.schema.json#/properties/languages.

The languages of the module.

type LeakVector

type LeakVector struct {
	// The task whose keys and leak phrases the leak check searches for. It is no template: a
	// template is searched through its instances, which the vectors of templates pin.
	Task Task `json:"task"`
	// The texts searched, each a case of the vector.
	Texts []SearchedText `json:"texts"`
}

LeakVector is the type of leak-vector.schema.json.

A test vector of the leak check, vectors/leaks/<case>.yaml: a task, and texts that the learner might see, each with every key and leak phrase of the task that the leak check finds in it (section 20 of the format text). It describes no part of a module.

type Lesson

type Lesson struct {
	// The lesson's local ID: the name of its file, without .yaml.
	ID LessonID `json:"id"`
	// What the lesson is called, in the module's explanation language. The learner sees it before
	// every task of the lesson, and the leak check searches it for their keys.
	Title Text `json:"title"`
	// The skills of the module, by local ID, that the lesson teaches. Every task of the lesson
	// trains one of them as a primary skill.
	Skills []SkillID `json:"skills"`
	// The age categories that the lesson suits, when they are fewer than the module's: the platform
	// gives the lesson only to a learner whom the lesson and each of its tasks suit.
	AgeCategories []AgeCategory `json:"age_categories,omitzero"`
	// The segments of the lesson, in the author's order: explanations, worked examples and tasks.
	// No two are the same.
	Segments []Segment `json:"segments"`
}

Lesson is the type of lesson.schema.json.

A lesson of a module: a sequence that its author made — explanations, worked examples and tasks, in order — and the skills of the module that it teaches. The skill graph orders the lessons.

type LessonID

type LessonID LocalID

LessonID is the type of common.schema.json#/$defs/lesson_id.

The local ID of a lesson.

type License

type License string

License is the type of common.schema.json#/$defs/license.

A license as an identifier of the SPDX License List, such as Apache-2.0 or CC-BY-SA-4.0: letters, digits, . and -.

type LinePart

type LinePart struct {
	// A piece of the line's text.
	Text *Text `json:"text,omitzero"`
	// A box of the line, an answer slot where the learner writes the answer.
	Binding *LinePartBinding `json:"binding,omitzero"`
	// The check of the box: what is right in it, and how the platform tells, the answer being
	// written by hand. Closed, the kind too: the learner's app does not get it.
	Check *WrittenCheck `json:"check,omitzero"`
}

LinePart is the type of task.schema.json#/$defs/line_part.

A piece of a line: a piece of text, or a box with its check.

type LinePartBinding

type LinePartBinding string

LinePartBinding is the type of task.schema.json#/$defs/line_part/properties/binding.

A box of the line, an answer slot where the learner writes the answer.

const (
	LinePartBindingBox LinePartBinding = "box"
)

The values of LinePartBinding.

type LocalID

type LocalID string

LocalID is the type of common.schema.json#/$defs/local_id.

The local ID of a skill, task, trap, technique or lesson: unique among the module's entries of its kind, in kebab-case, beginning with a letter, at most 64 characters, and not a name that Windows reserves for a device, since a local ID may name a file: counting-gaps.

type Manifest

type Manifest struct {
	// The version of the module format the module is written in, "0.3": the module is checked,
	// built and run by it. It stands at the root of the manifest in every version of the format, so
	// that a reader finds it before it knows which schemas to read the module by.
	ModuleFormatVersion ModuleFormatVersion `json:"module_format_version"`
	// The module's ID: novatrail/olympiad-math.
	ID ModuleID `json:"id"`
	// The module's version, X.Y.Z.
	Version ModuleVersion `json:"version"`
	// What the module is called, in its explanation language.
	Title Text `json:"title"`
	// What the module teaches.
	Subject Subject `json:"subject"`
	// Whom the module is for: its age categories and, for a module written for school grades, those
	// grades.
	Audience Audience `json:"audience"`
	// The bands of the module's difficulty scale, from the easiest: each task names its band and a
	// difficulty from 1 to 5 within it. A module with tasks has them.
	Bands []Band `json:"bands,omitzero"`
	// The languages of the module.
	Languages Languages `json:"languages"`
	// The anchor skills of the shared taxonomy that the module's skills need: exactly those that
	// its skill graph names as prerequisites. A module whose skills need none leaves this field
	// out.
	Dependencies []SharedTaxonomy `json:"dependencies,omitzero"`
	// The settings of the module's canvas, the same for each of its tasks.
	Canvas *CanvasSettings `json:"canvas,omitzero"`
	// Who wrote the module.
	Authors []Author `json:"authors"`
	// The license of the module's content: Apache-2.0 for an official module.
	License License `json:"license"`
	// The templates of rungs 1 and 2 of the hint ladder, in order, in the module's explanation
	// language: what the learner reads after a wrong answer when the tutor's question did not come
	// or did not pass its checks, and neither a trap text nor a trap's advice fits. A module with
	// an item with a verdict has them.
	RungTemplates []Text `json:"rung_templates,omitzero"`
}

Manifest is the type of manifest.schema.json.

The manifest of a module, manifest.yaml at the root of its folder: the format version the module is written in, its ID and version, what it is called and teaches, whom it is for, the bands of its difficulty scale, its languages, the anchor skills it builds on, the settings of its canvas, its authors and its license, and the templates of the rungs of its hint ladder. Every field is open, since the learner's app shows them.

type MediaPath

type MediaPath string

MediaPath is the type of common.schema.json#/$defs/media_path.

The path of a media file from the module's media/ folder: names in kebab-case that begin with a letter, joined by /, and the extension of the file's format — .png, .jpg, .webp or .mp3. No name is one that Windows reserves for a device. pictures/ladder.png.

type ModuleFormatVersion

type ModuleFormatVersion string

ModuleFormatVersion is the type of common.schema.json#/$defs/module_format_version.

A version of the module format, MAJOR.MINOR, written as a string: "0.3".

type ModuleID

type ModuleID string

ModuleID is the type of common.schema.json#/$defs/module_id.

The ID of a module, <publisher>/<name>, each a name in kebab-case that begins with a letter: novatrail/olympiad-math. The publisher owns the namespace its modules' names are in. Neither name is one that Windows reserves for a device, such as con or lpt1, since an ID may name a folder.

type ModuleIndex

type ModuleIndex struct {
	// The format version by which the index was built. It stands at the root of the index in every
	// version of the format, as it does in a manifest and an inventory.
	ModuleFormatVersion ModuleFormatVersion `json:"module_format_version"`
	// Every module that a release of modules has published, under its ID.
	Modules map[ModuleID]map[ModuleVersion]Entry `json:"modules"`
}

ModuleIndex is the type of module-index.schema.json.

The module index, module-index.json, a file of each release of modules (section 26 of the format text): every published version of every module, each by the digest of its package, with the release whose files hold it, the anchor skills it teaches and, when it has been withdrawn from publication, why. A release builds it from the index of the release before it, and the release workflow of .github signs it. Its members and those of an entry keep their places and meanings in every version of the format, so that the index carries the entries of every version; a reader of another version reads them by their places, not by this schema.

type ModuleVersion

type ModuleVersion string

ModuleVersion is the type of common.schema.json#/$defs/module_version.

The version of a module in Semantic Versioning 2.0.0, X.Y.Z, with no pre-release and no build metadata, written as a string: "1.2.0".

type Numbers

type Numbers map[TemplateName]int64

Numbers is the type of canonical-view.schema.json#/$defs/numbers.

The numbers of an instance of a template: every parameter, every derived number and every result of the solver of the template, by its name (sections 23 and 24).

type PackageVector

type PackageVector struct {
	// The server part: the canonical view of the module.
	ServerPart CanonicalView `json:"server_part"`
	// The listing of the device part.
	DevicePart DeviceListing `json:"device_part"`
	// The inventory of the package.
	Inventory Inventory `json:"inventory"`
	// The digest of the package: the digest of the canonical text of its inventory.
	Digest Digest `json:"digest"`
}

PackageVector is the type of package-vector.schema.json.

The package that a test vector of packages gives, package.yaml beside the module/ it is of (sections 9 and 25 of the format text): the module's server part, the listing of its device part, its inventory and its digest. An implementation builds the package of module/ and gets exactly these, whatever the order of keys. The results of a solver are the vector's, in the instances of the server part.

type Page added in v0.10.0

type Page struct {
	// The page, as large as the handwriting sheet.
	Sheet PageSheet `json:"sheet"`
	// The numbers of the layout, in units of the page.
	Numbers PageNumbers `json:"numbers"`
	// The most items that a page holds, 99 at most: the column of their numbers is two digits and a
	// full stop wide.
	MostItems int64 `json:"most_items"`
	// The table of widths, in whole hundredths of the type size.
	Widths PageWidths `json:"widths"`
	// The marks that glue two neighbours of a line together.
	Joints PageJoints `json:"joints"`
}

Page is the type of page.schema.json.

The numbers and the table of widths of a workbook's page, format/page.yaml (section 14 of the format text): canvas lays every page out by them, and task.workbook-page holds every task on a workbook to them. Units are those of the page, and a width of a character is in whole hundredths of the type size.

type PageItem added in v0.10.0

type PageItem struct {
	// The item's number, n., right in the column of the numbers on the baseline of its first line.
	Number PageText `json:"number"`
	// The item's texts and boxes, in the order they are read.
	Line []PagePart `json:"line"`
}

PageItem is the type of page-vector.schema.json#/$defs/page_item.

An item on the page.

type PageJoints added in v0.10.0

type PageJoints struct {
	// The marks that a word glues to the word before it: no space between them, and no break.
	Closing string `json:"closing"`
	// The marks that glue a word to the word after it, or to a box: no break after them.
	Opening string `json:"opening"`
}

PageJoints is the type of page.schema.json#/$defs/page_joints.

The marks that glue two neighbours of a line together.

type PageLine added in v0.10.0

type PageLine struct {
	// The pieces of the item's line, in order.
	Line []PageLinePart `json:"line"`
}

PageLine is the type of page-vector.schema.json#/$defs/page_line.

An item of a workbook, its line alone.

type PageLinePart added in v0.10.0

type PageLinePart struct {
	// A piece of text of the line.
	Text *string `json:"text,omitzero"`
	// A box, an answer slot.
	Binding *string `json:"binding,omitzero"`
}

PageLinePart is the type of page-vector.schema.json#/$defs/page_line_part.

A piece of the line: a piece of text, or a box.

type PageNumbers added in v0.10.0

type PageNumbers struct {
	// The type size of the text of a line.
	Size int64 `json:"size"`
	// The width of a box, the same for every box of the task.
	BoxWidth int64 `json:"box_width"`
	// The height of a box.
	BoxHeight int64 `json:"box_height"`
	// The height of a line of text without a box.
	Line int64 `json:"line"`
	// Between a line with a box and one without, in an item that wraps.
	Lead int64 `json:"lead"`
	// Between a box and a word beside it, and between an item's number and its line.
	Gap int64 `json:"gap"`
	// Between two boxes side by side, and between two lines with boxes in an item that wraps.
	Apart int64 `json:"apart"`
	// Between two rows of items.
	Items int64 `json:"items"`
	// Between the two columns of short items.
	Gutter int64 `json:"gutter"`
	// The margin of the page on its sides, its top and its bottom.
	Margin int64 `json:"margin"`
}

PageNumbers is the type of page.schema.json#/$defs/page_numbers.

The numbers of the layout, in units of the page.

type PagePart added in v0.10.0

type PagePart struct {
	// The text, its words joined by single spaces.
	Text *string `json:"text,omitzero"`
	// Where it starts.
	Left *int64 `json:"left,omitzero"`
	// Its alphabetic baseline.
	Baseline *int64 `json:"baseline,omitzero"`
	// The width that it is fitted to.
	Width *int64 `json:"width,omitzero"`
	// Of a box: its top.
	Top *int64 `json:"top,omitzero"`
	// Of a box: its height.
	Height *int64 `json:"height,omitzero"`
}

PagePart is the type of page-vector.schema.json#/$defs/page_part.

A text of the line on one line of the page, with its place, or a box, with its rectangle.

type PageSheet added in v0.10.0

type PageSheet struct {
	// The width of the page, in its units.
	Width int64 `json:"width"`
	// The height of the page, in its units.
	Height int64 `json:"height"`
}

PageSheet is the type of page.schema.json#/$defs/page_sheet.

The page, as large as the handwriting sheet.

type PageSpaceWidth added in v0.10.0

type PageSpaceWidth struct {
	// The code point of the space, U+ and four to six hexadecimal digits.
	CodePoint string `json:"code_point"`
	// Its width.
	Width int64 `json:"width"`
}

PageSpaceWidth is the type of page.schema.json#/$defs/page_space_width.

A space that does not break, of its own width.

type PageText added in v0.10.0

type PageText struct {
	// The text, its words joined by single spaces.
	Text string `json:"text"`
	// Where it starts.
	Left int64 `json:"left"`
	// Its alphabetic baseline.
	Baseline int64 `json:"baseline"`
	// The width that it is fitted to.
	Width int64 `json:"width"`
}

PageText is the type of page-vector.schema.json#/$defs/page_text.

The item's number, n., right in the column of the numbers on the baseline of its first line.

type PageVector added in v0.10.0

type PageVector struct {
	// The items of the task, in order.
	Items []PageLine `json:"items"`
	// The bottom of the last row of the page.
	Bottom *int64 `json:"bottom,omitzero"`
	// The items on the page, in the task's order.
	Page []PageItem `json:"page,omitzero"`
	// The item, counted from 0, at whose row the page has no room: the layout refuses the page
	// there, and task.workbook-page with it.
	NoRoomAt *int64 `json:"no_room_at,omitzero"`
}

PageVector is the type of page-vector.schema.json.

A test vector of the workbook's page (sections 9 and 14 of the format text): the lines of a task's items, as the open view holds them, and either the page that the layout makes of them or the item at whose row it has no room. An implementation lays the page out by format/page.yaml and gets exactly these.

type PageWide added in v0.10.0

type PageWide struct {
	// The width of such a character, a square.
	Width int64 `json:"width"`
	// The ranges of the wide characters.
	Ranges []string `json:"ranges"`
}

PageWide is the type of page.schema.json#/$defs/page_wide.

The characters of a square's width: Hangul, CJK, the full-width forms and emoji.

type PageWidthClass added in v0.10.0

type PageWidthClass struct {
	// The characters of the class.
	Characters string `json:"characters"`
	// Their width.
	Width int64 `json:"width"`
}

PageWidthClass is the type of page.schema.json#/$defs/page_width_class.

Characters of one width.

type PageWidths added in v0.10.0

type PageWidths struct {
	// The digits, all of one width.
	Digits PageWidthClass `json:"digits"`
	// The signs of operations and comparisons, all of one width.
	Signs PageWidthClass `json:"signs"`
	// The space between two words, which the layout sets itself.
	Space int64 `json:"space"`
	// The characters of a width of their own, each class by its width.
	Characters []PageWidthClass `json:"characters"`
	// The spaces that do not break, each a character of its word.
	Spaces []PageSpaceWidth `json:"spaces"`
	// The code points of no width, each joining the character before it.
	Zero []string `json:"zero"`
	// The characters of a square's width: Hangul, CJK, the full-width forms and emoji.
	Wide PageWide `json:"wide"`
	// The white space that a line breaks at: a run of it is one space between two words, and none
	// at the ends of a piece.
	Breaks []string `json:"breaks"`
	// The width of a character that the table does not know.
	Unknown int64 `json:"unknown"`
	// The joiner: the code point after it goes with the one before it.
	Joiner string `json:"joiner"`
	// The regional indicators, two of which make a flag, one cluster.
	RegionalIndicators string `json:"regional_indicators"`
}

PageWidths is the type of page.schema.json#/$defs/page_widths.

The table of widths, in whole hundredths of the type size.

type PermutationDraw

type PermutationDraw struct {
	// How many integers it orders.
	Count int64 `json:"count"`
	// The integers from 0 to the count less one, in the order it gives.
	Value []int64 `json:"value"`
}

PermutationDraw is the type of random-vector.schema.json#/$defs/draw/properties/permutation.

An order of the integers from 0 up to a count.

type PicturePath

type PicturePath MediaPath

PicturePath is the type of common.schema.json#/$defs/picture_path.

The path of a picture from the module's media/ folder: a media path whose extension is .png, .jpg or .webp.

type RandomState

type RandomState struct {
	// The high word of the state that starts the stream.
	High Unsigned `json:"high"`
	// The low word of the state that starts the stream.
	Low Unsigned `json:"low"`
}

RandomState is the type of random-vector.schema.json#/properties/state.

The two words that start the stream, as the generator takes them: those that the seed and the names derive, when they are given.

type RandomVector

type RandomVector struct {
	// The seed of the place of randomness whose stream this is. With it come its names, and the
	// state is the one they derive.
	Seed *Unsigned `json:"seed,omitzero"`
	// The names of the place of randomness, in order: each a string that is not empty and holds no
	// |.
	Names []string `json:"names,omitzero"`
	// The two words that start the stream, as the generator takes them: those that the seed and the
	// names derive, when they are given.
	State RandomState `json:"state"`
	// The functions called on the stream, in order, each with its arguments and the value it gives.
	Draws []Draw `json:"draws"`
}

RandomVector is the type of random-vector.schema.json.

A test vector of the generator (section 22 of the format text): the start of a stream — two words, and the seed and names of the place of randomness whose stream it is — and the functions called on the stream, in order, each with its arguments and the value it gives.

type Reading

type Reading struct {
	// The value read in each answer slot of the item, in the order of the answer slots, and the
	// verdict that each gets.
	AnswerSlots []SlotReading `json:"answer_slots"`
	// The verdict that the item gets, made of its answer slots' verdicts.
	Verdict Verdict `json:"verdict"`
}

Reading is the type of verdict-vector.schema.json#/$defs/reading.

A reading of the item: the values read in its answer slots, and the verdicts they give.

type Release

type Release string

Release is the type of module-index.schema.json#/$defs/release.

The tag of a release of modules, vX.Y.Z, as every NovaTrail repository numbers its releases.

type RetiredSkill

type RetiredSkill struct {
	// The skills of this version that took over what the retired skill taught: one for a skill
	// renamed, several for a skill split. Empty when none did: then a learner's progress in it
	// moves to no skill.
	ReplacedBy []SkillID `json:"replaced_by"`
}

RetiredSkill is the type of skill-graph.schema.json#/properties/retired_skills/additionalProperties.

A retired skill, under the local ID it had.

type SearchedText

type SearchedText struct {
	// A text that the learner might see, as it is written.
	Text string `json:"text"`
	// Every key and leak phrase of the task that the leak check finds in the text, as the task
	// writes them, in any order: empty when it finds none.
	Leaks []string `json:"leaks"`
}

SearchedText is the type of leak-vector.schema.json#/$defs/searched_text.

A text searched, and what the leak check finds in it.

type Segment

type Segment struct {
	// An explanation: paragraphs, pictures and numbered lists that the learner reads, in order, in
	// the module's explanation language.
	Explanation []ExplanationPart `json:"explanation,omitzero"`
	// A worked example: an example solved before the learner's eyes, on a handwriting sheet.
	WorkedExample *WorkedExample `json:"worked_example,omitzero"`
	// A task of the module, by its local ID. The next segment begins when the task ends.
	Task *TaskID `json:"task,omitzero"`
}

Segment is the type of lesson.schema.json#/$defs/segment.

A segment of a lesson: an explanation, a worked example or a task, by its one field.

type SharedTaxonomy

type SharedTaxonomy string

SharedTaxonomy is the type of shared-taxonomy.schema.json.

The vocabulary of anchor skills: the skills that belong to no module and that modules name to build on one another. Its instance is the ID of an anchor skill, core.<name>: a skill of a module names one among its prerequisites or in teaches, and a manifest in its dependencies. It describes no part of a module, and it refuses an ID that names no anchor skill. Each anchor skill is a branch of oneOf, with its ID, its title and its description, all in English; the description is normative, since it is what the skill means.

const (
	SharedTaxonomyCoreMultiplicationTable   SharedTaxonomy = "core.multiplication-table"
	SharedTaxonomyCoreDivisionWithRemainder SharedTaxonomy = "core.division-with-remainder"
	SharedTaxonomyCoreFractionsOfAWhole     SharedTaxonomy = "core.fractions-of-a-whole"
	SharedTaxonomyCoreLinearEquations       SharedTaxonomy = "core.linear-equations"
)

The values of SharedTaxonomy.

type SheetCheck

type SheetCheck = Check

SheetCheck is the type of task.schema.json#/$defs/sheet_check.

The check of the whole sheet: a rubric.

type SheetRectangle

type SheetRectangle struct {
	// How far the rectangle begins from the left edge of the sheet, in its units.
	Left int64 `json:"left"`
	// How far the rectangle begins from the top edge of the sheet, in its units.
	Top int64 `json:"top"`
	// The width of the rectangle, in units of the sheet.
	Width int64 `json:"width"`
	// The height of the rectangle, in units of the sheet.
	Height int64 `json:"height"`
}

SheetRectangle is the type of common.schema.json#/$defs/sheet_rectangle.

A rectangle of the handwriting sheet, in its units of 1000 × 1400 from the top left corner.

type Signed

type Signed string

Signed is the type of random-vector.schema.json#/$defs/signed.

A signed integer of 64 bits, from -9223372036854775808 to 9223372036854775807, in decimal digits with no leading zero.

type Skill

type Skill struct {
	// What the skill is called, in the module's explanation language.
	Title Text `json:"title"`
	// What a learner who has the skill can do, in the module's explanation language.
	Description *Text `json:"description,omitzero"`
	// The skills that a learner needs before this one, all of them: skills of the module by local
	// ID, and anchor skills of the shared taxonomy by their IDs. A skill with none leaves this
	// field out.
	Prerequisites []string `json:"prerequisites,omitzero"`
	// The anchor skills of the shared taxonomy that this skill teaches: a learner who has this
	// skill can do what the description of each says. Other modules build on them, and the learner
	// model decides by such skills whether a learner has them. A skill that teaches none leaves
	// this field out.
	Teaches []SharedTaxonomy `json:"teaches,omitzero"`
	// How the platform can know a learner's command of the skill: verdict, when its tasks are
	// checked against a key or a predicate; rubric, when work on it gets feedback by the author's
	// rubric and no verdict; none, when it is practised and not assessed.
	Assessability SkillAssessability `json:"assessability"`
}

Skill is the type of skill-graph.schema.json#/properties/skills/additionalProperties.

A skill of the module, under its local ID.

type SkillAssessability

type SkillAssessability string

SkillAssessability is the type of skill-graph.schema.json#/properties/skills/additionalProperties/properties/assessability.

How the platform can know a learner's command of the skill: verdict, when its tasks are checked against a key or a predicate; rubric, when work on it gets feedback by the author's rubric and no verdict; none, when it is practised and not assessed.

const (
	SkillAssessabilityVerdict SkillAssessability = "verdict"
	SkillAssessabilityRubric  SkillAssessability = "rubric"
	SkillAssessabilityNone    SkillAssessability = "none"
)

The values of SkillAssessability.

type SkillGraph

type SkillGraph struct {
	// The names of the tiers, in order from tier 1. The tiers past the last name are shown by their
	// numbers, and a name past the last tier names none.
	Tiers []Text `json:"tiers,omitzero"`
	// The module's skills, each under its local ID. Their order carries no meaning.
	Skills map[SkillID]Skill `json:"skills"`
	// The skills that earlier versions of the module had and this one has no more, under the IDs
	// they had: the table by which a learner's progress moves to the skills of this version. An
	// entry stays in every later version, and its ID never names another skill.
	RetiredSkills map[SkillID]RetiredSkill `json:"retired_skills,omitzero"`
}

SkillGraph is the type of skill-graph.schema.json.

The skill graph of a module, skill-graph.yaml at the root of its folder: the module's skills, what a learner needs before each one, how the platform can know a learner's command of each, which anchor skills of the shared taxonomy each one teaches, the names of the tiers, and the skills that the module had once and has no more. The tier of a skill is computed from the prerequisites, never written, and module-kit puts it into the module's package. Every field is open but retired_skills, since the skill map shows them.

type SkillID

type SkillID LocalID

SkillID is the type of common.schema.json#/$defs/skill_id.

The local ID of a skill.

type SkillTiers

type SkillTiers map[SkillID]int64

SkillTiers is the type of canonical-view.schema.json#/$defs/skill_tiers.

The tier of every skill of a skill graph, by the skill's local ID (section 12).

type Skills

type Skills struct {
	// The skills of the module, by local ID, that are trained: a wrong answer is evidence against
	// them.
	Primary []SkillID `json:"primary"`
	// The skills that the answer needs and that a wrong answer does not count against: skills of
	// the module by local ID, or anchor skills of the shared taxonomy by their IDs.
	Supporting []string `json:"supporting,omitzero"`
}

Skills is the type of task.schema.json#/$defs/skills.

The primary and supporting skills of a task or an item.

type SlotReading

type SlotReading struct {
	// The value read in the answer slot, as it is written, or null when nothing was read.
	Value *string `json:"value"`
	// The verdict that the answer slot gets.
	Verdict Verdict `json:"verdict"`
	// Why the answer slot is unreadable: nothing was read, or the value is not in the notation of
	// the check kind.
	Reason *SlotReadingReason `json:"reason,omitzero"`
	// The trap that the value matches among the trap values of the answer slot's check: only for a
	// value that is not yet right.
	Trap *TrapID `json:"trap,omitzero"`
}

SlotReading is the type of verdict-vector.schema.json#/$defs/slot_reading.

The value read in an answer slot, and its verdict: with the reason, when it is unreadable, and with the trap, when it matches one.

type SlotReadingReason

type SlotReadingReason string

SlotReadingReason is the type of verdict-vector.schema.json#/$defs/slot_reading/properties/reason.

Why the answer slot is unreadable: nothing was read, or the value is not in the notation of the check kind.

const (
	SlotReadingReasonBlank    SlotReadingReason = "blank"
	SlotReadingReasonNotation SlotReadingReason = "notation"
)

The values of SlotReadingReason.

type Solver

type Solver struct {
	// The program of Starlark, at most 8192 characters long, that defines solve(numbers): given the
	// numbers that the open fields of an instance show, it returns a dict of the results, each a
	// name with its int.
	Program string `json:"program"`
	// The names of the results that solve returns for every instance, exactly these. A result
	// stands only in a key or a trap value of a number or a fraction, in the solution and in a leak
	// phrase.
	Results []TemplateName `json:"results"`
}

Solver is the type of task.schema.json#/$defs/solver.

A program of Starlark that finds numbers of each instance of a template by search, as the solvers of mathtrail-standalone do, and the names of the numbers that it finds.

type SolvingSteps

type SolvingSteps struct {
	// The steps, in order, each named by its place, from 1.
	Steps []Step `json:"steps"`
}

SolvingSteps is the type of solving-steps.schema.json.

The solving steps of a module, solving-steps.yaml at the root of its folder: the frame through which the tutor leads a learner within a task, step by step, each with its title, what of the task it gives and when it ends. Every task of the module goes through the same steps. Every field is open, since the learner's app leads the steps itself.

type StatementPart

type StatementPart struct {
	// A paragraph, as plain text.
	Text *Text `json:"text,omitzero"`
	// A picture, by its path from media/; in a task, a template's may hold placeholders, and a
	// lesson's holds none.
	Picture *TaskPicturePath `json:"picture,omitzero"`
	// What the picture shows, in words: a screen reader reads it, and it stands in the picture's
	// place until the picture comes. Empty for a picture that only decorates.
	Alt *string `json:"alt,omitzero"`
	// The width the picture is shown at, in CSS px; narrower when the text it stands in is.
	Width *int64 `json:"width,omitzero"`
	// The height the picture is shown at, in CSS px, in proportion to its width.
	Height *int64 `json:"height,omitzero"`
}

StatementPart is the type of common.schema.json#/$defs/statement_part.

A part of a text that the learner reads — a statement, a solution, the statement of a worked example, or a paragraph or a picture of an explanation, which the lesson's own explanation_part repeats: a paragraph, or a picture with what it shows and its size.

type Step

type Step struct {
	// What the learner does in the step, in the module's explanation language.
	Title Text `json:"title"`
	// How to go through the step, in the module's explanation language, which the learner's app
	// shows beside its title. Every task of the module goes through the step, so the leak check
	// searches it for the keys of every task.
	Description *Text `json:"description,omitzero"`
	// What of the task the step gives the learner: givens, the task's givens and unknown, which the
	// learner ticks; techniques, the task's techniques, which the server gives when the step
	// begins. A step that gives neither leaves this field out.
	Gives []StepGives `json:"gives,omitzero"`
	// When the step ends, by an event on the learner's device and with no key: givens_ticked, once
	// the learner has ticked every given and the unknown; answer_slots_filled, once every answer
	// slot of the task holds something of the learner's; none, when the learner moves on.
	ExitCondition StepExitCondition `json:"exit_condition"`
}

Step is the type of solving-steps.schema.json#/$defs/step.

A solving step: what the learner does in it, what of the task it gives, and when it ends.

type StepExitCondition

type StepExitCondition string

StepExitCondition is the type of solving-steps.schema.json#/$defs/step/properties/exit_condition.

When the step ends, by an event on the learner's device and with no key: givens_ticked, once the learner has ticked every given and the unknown; answer_slots_filled, once every answer slot of the task holds something of the learner's; none, when the learner moves on.

const (
	StepExitConditionGivensTicked      StepExitCondition = "givens_ticked"
	StepExitConditionAnswerSlotsFilled StepExitCondition = "answer_slots_filled"
	StepExitConditionNone              StepExitCondition = "none"
)

The values of StepExitCondition.

type StepGives

type StepGives string

StepGives is the type of solving-steps.schema.json#/$defs/step/properties/gives/items.

const (
	StepGivesGivens     StepGives = "givens"
	StepGivesTechniques StepGives = "techniques"
)

The values of StepGives.

type Subject

type Subject string

Subject is the type of common.schema.json#/$defs/subject.

The code of a subject: what a module teaches.

const (
	SubjectMathematics Subject = "mathematics"
	SubjectPhysics     Subject = "physics"
	SubjectWriting     Subject = "writing"
)

The values of Subject.

type Task

type Task struct {
	// The task's local ID: the name of its file, without .yaml.
	ID TaskID `json:"id"`
	// The statement of the task, what the learner reads: paragraphs and pictures in order, in the
	// module's explanation language. Whether it stands above the canvas or on it is the canvas
	// kind's to decide.
	Statement []StatementPart `json:"statement"`
	// The canvas of the task, one for all its items: its kind and the kind's settings.
	Canvas Canvas `json:"canvas"`
	// The items of the task, each named by its place, from 1. On a handwriting sheet an item has
	// answer slots; on a workbook it is a line of text and boxes.
	Items []Item `json:"items"`
	// What the statement gives, each a short text in the module's explanation language: the chips
	// that the learner ticks at a solving step that gives them, and what a hint asked for gives
	// before the first answer.
	Givens []Text `json:"givens,omitzero"`
	// What the task asks to find, in the module's explanation language: the chip that the learner
	// ticks beside the givens.
	Unknown *Text `json:"unknown,omitzero"`
	// The author's question that breaks the task down, in the module's explanation language: what a
	// hint asked for gives before the first wrong answer, with the techniques. Closed, since it
	// hints at how to solve the task more than a technique does; the leak check searches it for the
	// task's keys.
	LeadingQuestion *Text `json:"leading_question,omitzero"`
	// The skills that the task trains and needs, for each item that names none of its own.
	Skills Skills `json:"skills"`
	// The band of the module's difficulty scale that the task is in, by its ID in the manifest.
	Band BandID `json:"band"`
	// How hard the task is within its band, from 1 to 5.
	Difficulty int64 `json:"difficulty"`
	// The age categories that the task suits, when they are fewer than the module's: the platform
	// gives the task only to learners in one of them. Without it, the task suits the module's
	// audience.
	AgeCategories []AgeCategory `json:"age_categories,omitzero"`
	// The techniques of the module's technique catalog that help in the task, by local ID. The
	// server gives them at a solving step that gives them or on request: a technique's title tells
	// how to solve the task.
	Techniques []TechniqueID `json:"techniques,omitzero"`
	// The traps of the module's trap catalog that AI may suggest from the kind of mistake in the
	// learner's work, by local ID. A trap that a wrong value shows is named in the check instead,
	// among its trap values.
	Traps []TrapID `json:"traps,omitzero"`
	// How the task is solved, in parts as the statement is: paragraphs and pictures. The learner
	// sees it once the task is solved, and AI reads it to find the first mistake in the learner's
	// work. A task with an item with a verdict has one.
	Solution []StatementPart `json:"solution,omitzero"`
	// Phrases that give the answer away beyond the keys themselves, which the leak check searches
	// for in every text that the learner sees before the task is solved: an answer in words, a key
	// that its item shows already, the answer to a predicate.
	LeakPhrases []Text `json:"leak_phrases,omitzero"`
	// What makes the task a template: its parameters, the numbers derived from them, the constraint
	// on their combinations and its solver. Each attempt gets one instance of the template, picked
	// by the seed of the attempt, and the learner's app never gets the template itself.
	Template *Template `json:"template,omitzero"`
}

Task is the type of task.schema.json.

A task of a module, tasks/<id>.yaml in its folder: its statement, its canvas, its items with their answer slots, each with the check that says what is right in it, the skills it trains, its band and difficulty, and, when they are fewer than the module's, the age categories it is for; and what helps the learner on the way: what the statement gives and asks, the techniques that help, the traps that AI may suggest, a simpler case for each item, the solution and the phrases that give the answer away. The ID, the statement, the canvas, the items, the givens and the unknown are open, since the learner's app shows them, but for the skills and the simpler case of an item and the check of each answer slot; those, the skills, the band, the difficulty, the age categories, the techniques, the traps, the solution, the leak phrases and the template are closed, since the server reads them. A task with a template is a template of tasks: each attempt gets one instance of it, with numbers in the place of its placeholders.

type TaskID

type TaskID LocalID

TaskID is the type of common.schema.json#/$defs/task_id.

The local ID of a task.

type TaskPicturePath added in v0.10.0

type TaskPicturePath string

TaskPicturePath is the type of common.schema.json#/$defs/task_picture_path.

The path of a picture of a task's statement or solution: a picture path, and in a template, one whose names MAY hold placeholders of parameters and derived numbers, each after a -, such as pictures/split-{total}-{parts}.png, which every instance replaces with numbers.

type Technique

type Technique struct {
	// What the technique is called, in the module's explanation language.
	Title Text `json:"title"`
	// What the technique is and when it helps, in the module's explanation language.
	Description *Text `json:"description,omitzero"`
}

Technique is the type of techniques.schema.json#/properties/techniques/additionalProperties.

A technique of the module, under its local ID.

type TechniqueID

type TechniqueID LocalID

TechniqueID is the type of common.schema.json#/$defs/technique_id.

The local ID of a technique.

type Techniques

type Techniques struct {
	// The module's techniques, each under its local ID. Their order carries no meaning, and this
	// version gives them no numbers.
	Techniques map[TechniqueID]Technique `json:"techniques"`
}

Techniques is the type of techniques.schema.json.

The technique catalog of a module, techniques.yaml at the root of its folder: the ways of solving that the module names and teaches, each under its local ID, with its title and what it is. A task names the techniques that help in it, and which those are is closed, in the task. Every field of the catalog is open, as the skills of the skill graph are.

type Template

type Template struct {
	// The parameters of the template, each by its name with its domain. Their combinations are
	// counted through in the order of their names, the first changing slowest.
	Parameters map[TemplateName]Domain `json:"parameters"`
	// The derived numbers of the template, each by its name with the expression that computes it
	// from the parameters, such as legs: "2 * chickens + 4 * rabbits".
	Derived map[TemplateName]TemplateExpression `json:"derived,omitzero"`
	// A bool expression of the parameters and the derived numbers that holds for the combinations
	// that give an instance. Without it, every combination gives one.
	Constraint *TemplateExpression `json:"constraint,omitzero"`
	// The solver of the template: a program of Starlark that finds, by search, numbers of each
	// instance that no expression gives, such as its key. Its results are named as the parameters
	// and the derived numbers are, and stand in placeholders too.
	Solver *Solver `json:"solver,omitzero"`
}

Template is the type of task.schema.json#/$defs/template.

A template of tasks: parameters with their domains, the numbers derived from them, the constraint that picks the combinations that are its instances, and the solver that finds what no expression gives.

type TemplateExpression

type TemplateExpression string

TemplateExpression is the type of task.schema.json#/$defs/template_expression.

An expression of the narrow subset of Starlark of section 23 of the format text: integers and names, + - * // %, comparisons, and, or and not.

type TemplateName

type TemplateName string

TemplateName is the type of task.schema.json#/$defs/template_name.

The name of a parameter or a derived number: lowercase letters, digits and _, beginning with a letter, at most 14 characters long so that {name} fits a key, and no keyword or reserved word of Starlark.

type TemplateVector

type TemplateVector struct {
	// The template: a task with a template, which breaks no rule of a task.
	Task Task `json:"task"`
	// The number of the template's instances: the combinations of its parameters for which its
	// constraint holds.
	Count int64 `json:"count"`
	// The names of the numbers that solve gets on each instance, in any order: the parameters and
	// the derived numbers whose placeholders stand in the open fields of the template. A vector has
	// them when its template has a solver, and only then, and they may be none.
	Inputs []TemplateName `json:"inputs,omitzero"`
	// Attempts on the template, each by its seed, with the instance that the seed picks.
	Attempts []Attempt `json:"attempts"`
}

TemplateVector is the type of template-vector.schema.json.

A test vector of templates (sections 23 and 24 of the format text): a template, the number of its instances, the names that its solver gets, when it has one, and attempts, each with its seed, the numbers of the instance that the seed picks, that instance, and the digest of its open view. An implementation counts the instances, picks the instance of each seed, runs the solver on it, replaces the placeholders, and gets exactly these.

type Text

type Text string

Text is the type of common.schema.json#/$defs/text.

A text of the module for people to read, in its explanation language. Not empty.

type TierVector

type TierVector struct {
	// The skill graph, whose prerequisites among the module's skills run in no cycle.
	SkillGraph SkillGraph `json:"skill_graph"`
	// The tier of every skill of the graph, as the canonical view holds it.
	SkillTiers SkillTiers `json:"skill_tiers"`
}

TierVector is the type of tier-vector.schema.json.

A test vector of tiers (sections 12 and 25 of the format text): a skill graph and the tier of each of its skills. An implementation computes the tiers from the prerequisites and gets exactly these.

type Trap

type Trap struct {
	// What the mistake is, in the module's explanation language: AI reads it to suggest the trap
	// from the learner's work, and the learner's progress names the mistakes that repeat by it.
	Description Text `json:"description"`
	// The skills of the module that the mistake belongs to, by local ID. A trap that belongs to no
	// skill leaves this field out.
	Skills []SkillID `json:"skills,omitzero"`
	// What to advise the adult or the learner on this mistake, in the module's explanation
	// language: the learner's progress gives it beside a trap that repeats, and it is the fallback
	// text of the first two rungs after a wrong value of the trap that has no text of its own.
	TrapAdvice Text `json:"trap_advice"`
}

Trap is the type of traps.schema.json#/properties/traps/additionalProperties.

A trap of the module, under its local ID.

type TrapID

type TrapID LocalID

TrapID is the type of common.schema.json#/$defs/trap_id.

The local ID of a trap.

type TrapValue

type TrapValue struct {
	// The wrong value, as the key is written: for a choice, one of its options other than the key;
	// for a time, in the notation of a time read, so that 5:60 can show a trap.
	Value string `json:"value"`
	// The trap that this wrong value shows, by its local ID in the module's trap catalog.
	Trap TrapID `json:"trap"`
	// What the learner reads after this wrong value: it names the mistake rather than retelling the
	// solution. Without it, the trap's advice stands in.
	Text *Text `json:"text,omitzero"`
}

TrapValue is the type of task.schema.json#/$defs/trap_value.

A wrong value that the author knows, with the trap it shows.

type Traps

type Traps struct {
	// The module's traps, each under its local ID. Their order carries no meaning.
	Traps map[TrapID]Trap `json:"traps"`
}

Traps is the type of traps.schema.json.

The trap catalog of a module, traps.yaml at the root of its folder: the typical mistakes that the module's tasks catch, each under its local ID, with what the mistake is, the skills it belongs to and what to advise on it. A task names only a trap of the catalog, so that a wrong answer becomes a diagnosis that can be counted. Every field is closed, since a trap tells what mistake a task expects.

type Unsigned

type Unsigned string

Unsigned is the type of random-vector.schema.json#/$defs/unsigned.

An unsigned integer of 64 bits, from 0 to 18446744073709551615, in decimal digits with no leading zero: a YAML number holds an integer of 53 bits at most.

type Verdict

type Verdict string

Verdict is the type of verdict-vector.schema.json#/$defs/verdict.

A verdict: correct; not yet; unreadable, which asks the learner to write again; or unchecked, when the check could not run.

const (
	VerdictCorrect    Verdict = "correct"
	VerdictNotYet     Verdict = "not_yet"
	VerdictUnreadable Verdict = "unreadable"
	VerdictUnchecked  Verdict = "unchecked"
)

The values of Verdict.

type VerdictVector

type VerdictVector struct {
	// The item: on a handwriting sheet its answer slots, on a workbook its line, and every answer
	// slot with its check.
	Item Item `json:"item"`
	// The readings of the item, each a case of the vector.
	Readings []Reading `json:"readings"`
}

VerdictVector is the type of verdict-vector.schema.json.

A test vector of a check kind's verdicts, vectors/verdicts/<kind>/<case>.yaml: an item of a task whose answer slots are checked by that kind, and readings of it, each the value read in every answer slot, with the verdict and the trap that each answer slot gets and the verdict that the item gets (section 15 of the format text). It describes no part of a module.

type VersionVector added in v0.9.0

type VersionVector struct {
	// The lowest part of its version that the new version raises, which the comparison finds, when
	// the new version is not refused: none when nothing but the version changed, or when the new
	// version is the newest published one as it was.
	VersionPart *VersionVectorVersionPart `json:"version_part,omitzero"`
	// The rule of versions by which the new version is refused, when it is: the case breaks that
	// rule and no other.
	Refusal *VersionVectorRefusal `json:"refusal,omitzero"`
}

VersionVector is the type of version-vector.schema.json.

What a test vector of versions of a module gives, version.yaml beside the new version in module/ and the published versions in published/ (sections 9 and 27 of the format text): either the part of the version that the comparison of the new version with the newest published version finds, or the rule of versions by which the new version is refused. An implementation compares the new version with every published version and gets exactly this.

type VersionVectorRefusal added in v0.9.0

type VersionVectorRefusal string

VersionVectorRefusal is the type of version-vector.schema.json#/properties/refusal.

The rule of versions by which the new version is refused, when it is: the case breaks that rule and no other.

const (
	VersionVectorRefusalModuleVersionAbove           VersionVectorRefusal = "module-version.above"
	VersionVectorRefusalModuleVersionStep            VersionVectorRefusal = "module-version.step"
	VersionVectorRefusalModuleVersionRetiredComplete VersionVectorRefusal = "module-version.retired-complete"
	VersionVectorRefusalModuleVersionRetiredKept     VersionVectorRefusal = "module-version.retired-kept"
	VersionVectorRefusalModuleVersionRetiredKnown    VersionVectorRefusal = "module-version.retired-known"
	VersionVectorRefusalModuleVersionIdsKept         VersionVectorRefusal = "module-version.ids-kept"
	VersionVectorRefusalModuleVersionLanguagesKept   VersionVectorRefusal = "module-version.languages-kept"
	VersionVectorRefusalModuleVersionBandsKept       VersionVectorRefusal = "module-version.bands-kept"
)

The values of VersionVectorRefusal.

type VersionVectorVersionPart added in v0.9.0

type VersionVectorVersionPart string

VersionVectorVersionPart is the type of version-vector.schema.json#/properties/version_part.

The lowest part of its version that the new version raises, which the comparison finds, when the new version is not refused: none when nothing but the version changed, or when the new version is the newest published one as it was.

const (
	VersionVectorVersionPartMajor VersionVectorVersionPart = "major"
	VersionVectorVersionPartMinor VersionVectorVersionPart = "minor"
	VersionVectorVersionPartPatch VersionVectorVersionPart = "patch"
	VersionVectorVersionPartNone  VersionVectorVersionPart = "none"
)

The values of VersionVectorVersionPart.

type WithdrawalReason

type WithdrawalReason string

WithdrawalReason is the type of module-index.schema.json#/$defs/withdrawal_reason.

Why a version was withdrawn: wrong_key, a key or a predicate of it gives wrong verdicts; answer_leak, a text that the learner sees gives an answer away; unsuitable_content, it holds content that does not suit the learners it may reach. A reader takes a version as withdrawn whatever the reason, also one that a later version of the format adds.

const (
	WithdrawalReasonWrongKey          WithdrawalReason = "wrong_key"
	WithdrawalReasonAnswerLeak        WithdrawalReason = "answer_leak"
	WithdrawalReasonUnsuitableContent WithdrawalReason = "unsuitable_content"
)

The values of WithdrawalReason.

type Withdrawals added in v0.8.5

type Withdrawals map[ModuleID]map[ModuleVersion]WithdrawalReason

Withdrawals is the type of module-index.schema.json#/$defs/withdrawals.

The withdrawals of a release of modules, which the build of its index marks (section 26 of the format text): under each module's ID, under each version it withdraws, the reason of the withdrawal. modules keeps them in a file of its own, and a test vector of the index in its member withdrawals. A release that withdraws none has no withdrawals, rather than an empty object.

type WorkedExample

type WorkedExample struct {
	// What the example asks: paragraphs and pictures in order, as a task's statement.
	Statement []StatementPart `json:"statement"`
	// What the author's demo is shown on: a handwriting sheet and its grid, or a workbook, the
	// example's lines with their boxes. The learner does not write on it.
	Canvas Canvas `json:"canvas"`
	// On a workbook: the example's lines, each with its boxes and what they hold, laid out on the
	// page as a task's lines are.
	Lines []ExampleLine `json:"lines,omitzero"`
	// The author's demo: the parts of how the example is solved, in order, which the learner opens
	// one at a time and may hide.
	Demo []DemoPart `json:"demo"`
}

WorkedExample is the type of lesson.schema.json#/$defs/worked_example.

A worked example of a lesson: no task, with no answer slots and no key. On a handwriting sheet the demo shows pictures on the sheet; on a workbook it fills the boxes of the example's lines.

type WrittenCheck

type WrittenCheck = Check

WrittenCheck is the type of task.schema.json#/$defs/written_check.

The check of an answer written by hand, in a box, in a zone or anywhere on the sheet: a choice among them holds its own options.

Directories

Path Synopsis
Package open holds the open view of each part of a module (format/README.md, section 6): the struct of each type the open view of a part reaches, by the name it has in formatv0, with the fields marked x-open alone, of version 0.4.
Package open holds the open view of each part of a module (format/README.md, section 6): the struct of each type the open view of a part reaches, by the name it has in formatv0, with the fields marked x-open alone, of version 0.4.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL