README
¶
The NovaTrail API contracts
This is the text of the API contracts: how the messages and services that NovaTrail's parts exchange are written in protobuf, which rules buf holds them to, how they are versioned, which code is generated from them, and what each contract means and which rules its parts follow. It is normative, as are the .proto files beside it. The documents under docs/ describe the platform in Russian and add no rules to the contracts.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 (RFC 2119, RFC 8174) when, and only when, they appear in all capitals, as shown here.
1. About the contracts
- An API contract — a contract, in this text — is a protobuf package: its messages, and the services one part of the platform calls on another. The contract of the element
<novatrail-canvas>withappis not one: it is TypeScript types, written by hand. The first ones are the observation, whichtutor,module-kitandapiexchange in one process, and the contract betweenappandapi. - The contracts are the
.protofiles undercontracts/and this text. The code generated from them is no part of the contract: it follows from the files (see Generated code, below). - The names in the contracts are the English terms of the glossary of
docs/concepts.md. A value or an ID of the module format keeps the spelling the format gives it (see Fields, below). - The first package is
novatrail.observation.v1, the observation. The second isnovatrail.eval.v1, the eval protocol: the sample file with its markup, the rules of the strokes on a sheet that the device and the runner share, eval sets and the runner's report. The third isnovatrail.api.v1, the contract betweenappandapi. The fourth isnovatrail.paper.v1, of a task from the learner's paper, whichtutor,module-kitandapiexchange in one process: the answer of the Check, in which a model judges the work, the reading of "Recognise", and the key of the solver ofmodule-kit, which no task from paper is checked by. The other tasks of epic E3 add theirs, each by the rules of this text.
2. Versions
- A contract has no version of its own beside its package. Its version is the last component of its package,
v1, and the tag ofspecin which a file came out. - Within a package a change MUST only add: a new message, field, enum value, service or method.
buf breakingholds this against the previous release ofspec(see buf's rules, below). Such a change comes out in any release of the line. - A change of what a contract means breaks it too, though buf sees none: another meaning of a field or an enum value, or another rule of how a part of the platform reads a message — such as how two observations are joined, or which verdict an observation gives. Whatever can give another result on the same message is such a change. A new enum value, or a new field, whose meaning changes none of the old ones, only adds.
- A change that would break a package MUST come as a new package,
v2, beside the old one. A packagevNwith N of 2 or more, beside itsv(N−1), opens a new line ofspec, as a new version of the module format does. The first packagev1of a new part opens none. A version of a package is never reused. - A server holds two major packages of a contract: the current one and the previous one. A client reads the package it was built with. Within a major package, a client older than the server works with it, since both sides of the transport skip the fields they do not know.
3. Files and names
- A file MUST lie at
contracts/novatrail/<part>/v1/<name>.proto, and its package MUST benovatrail.<part>.v1: the path fromcontracts/repeats the package, as buf's rulePACKAGE_DIRECTORY_MATCHasks.<part>and<name>are lower snake case. - The test vectors of a package lie at
contracts/vectors/<part>/v1/<case>.json,<case>in kebab case; a package has them when this text gives it rules that a program follows, as it does the observation and, in the rules the device and the runner share, the eval protocol. - The examples of a package lie at
contracts/examples/<part>/v1/<case>.json,<case>in kebab case: messages of the package written by the rules of JSON below, whichspec's checks hold to the rules of this text, as they do the sample file. Where a package's examples show more than one message, the case names the message: ofnovatrail.eval.v1, an example whose case begins withreport-is a runner's report, and any other a sample file. - The prefix
novatrailkeeps every name unique: a Go program refuses to start with two protobuf declarations of one name linked into it. buf.yaml, version 2, lies at the root ofspec, with one module,contracts, and nodeps: the build MUST NOT depend on the Buf Schema Registry or any other service outside the repository.- Comments in the files are in English. Every message, field, enum, enum value, oneof, service and method MUST have a leading comment that says what it is, as a schema of the format describes each property.
4. Syntax
- A file MUST begin with
syntax = "proto3";. Editions are not used: moving to them is a decision of its own, and it changes neither the wire nor JSON. - A scalar field where "absent" and zero differ MUST be
optional, as absence differs from a zero value in the module format's types.
5. Fields
- A field's name is the glossary's English term in snake case, and a repeated field's name is plural.
- A place and a crop on the canvas, in thousandths of the crop, and the other small integers of the platform, are
int32. A field MUST NOT beint64unless its value can exceed 2³¹ − 1, the largestint32: in JSON anint64is a string, and in TypeScript abigint. Unsigned types are not used. - The zero value of an enum MUST be
<ENUM>_UNSPECIFIEDand means nothing. A field or an enum value is never removed from a package (see Versions, above): what a contract no longer needs stays, its comment says so, and the next major package leaves it out. - A value or an ID of the module format — a canvas kind such as
handwriting_sheet, a task's ID — is astringholding the format's own spelling, not an enum of the contract, so that one value has one spelling. - One of several alternatives is a
oneof. - A PNG, or any other file, is
bytes; in JSON it is a base64 string. - A moment is
google.protobuf.Timestamp; in JSON it is a string of RFC 3339, in UTC.
6. JSON
- A field's name in JSON MUST be its protobuf name, in snake case, the same as in the module format. Whatever writes JSON of a contract — a file of
spec, a sample file, a codec of the transport — MUST print the protobuf names:UseProtoNamesofprotojsonin Go,useProtoFieldNamein protobuf-es. - The option
json_nameMUST NOT be used. - A reader MUST accept both the protobuf name and the lowerCamelCase name, as ProtoJSON requires of every parser.
7. buf's rules
buf lintholds every file to the categoriesSTANDARD,COMMENTSandUNARY_RPC, with no exceptions, and withdisallow_comment_ignores: true: a comment in a file MUST NOT switch a rule off. A method streams nothing.buf breakingholds every package to the categoryFILEagainst the previous release ofspec: the newest release tag in the history of the commit checked, other than the commit's own, withbuf.yamlandcontracts/as git holds them at that tag. A working tree that changesbuf.yamlorcontracts/is checked as the commit that would follow its HEAD, so a release of HEAD is the previous one then. A release in which a package first appears has nothing to compare it with.- No rule of protovalidate is used: its module lives in the Buf Schema Registry.
- Beside buf's rules,
spec's checks hold every rule of this text that a program can read: the syntax, the path and the package, nojson_nameand no unsigned type,buf.yamlas the rules of files and names and this section have it, and a template ofbuf generatewith local plugins alone.optionalwhere absence differs from zero, andint64only past 2³¹ − 1, are held by review. The rules of the observation and those the device and the runner share are held by their test vectors, whichspec's checks compute (the "Test vectors" of each), those of the sample file and of the rules the device and the runner share by the check of each example (the sample file's "Examples") and of each sample file another repository names (the sample file's "Checking a sample"), and those of eval sets that need neither a module's package nor a key by the check of a module's eval set (the sample file's "Checking a sample"), and the form of a report by the check of its examples (the runner's report's "Examples") and of each report another repository names (its "Checking a report"). The rules of eval sets and of the runner's report are rules of the runner, whichtutor's tests and review hold, beyond what the check of a module's eval set holds of eval sets and the check of a report of the report: the measures of the runner's report have no vectors, since one implementation counts them, and a report's records let anyone count them again. The contract betweenappandapihas no vectors either: its rules are whatappandapido, which their tests and review hold. That a change of any of them is a change of meaning, which breaks the package (see Versions, above), review holds.
8. Generated code
- The code is generated from the files by buf with local plugins at exact versions; no remote plugin of the Buf Schema Registry is used.
buf.gen.yamlat the root ofspecnames them:protoc-gen-goandprotoc-gen-connect-goare tools ofcontracts/go.mod, so that each comes at the version of the runtime the module requires, andprotoc-gen-esis a package ofspec's tools. The code lies in the repository beside the files, andspec's checks verify that it is what buf generates. - Go. The code is the module
github.com/altnovatrail/spec/contracts, whosego.modlies incontracts/: the messages fromprotoc-gen-goand the services fromprotoc-gen-connect-go. Beside them, written by hand, the packagecontractsat the root of the module embeds the test vectors ascontracts.Vectors, anfs.FSwhose root iscontracts/vectors/, and requires nothing beyond Go's standard library. The module carries the examples too, as files ofcontracts/examples/. Its tag iscontracts/vX.Y.Z, with the number of the tag ofspec, on the same commit: from the line 0.7 on, the release ofspecsets it once the release is out. It requires the protobuf runtime and Connect at exact versions, while the modulegithub.com/altnovatrail/specat the root still requires nothing. Code on Go MUST take a contract from this module and MUST NOT generate its own: two copies of one contract in one program refuse to start. - TypeScript. The code is the npm package
@altnovatrail/contracts, JavaScript with its declarations fromprotoc-gen-es, and no types of JSON: they would spell the fields in lowerCamelCase, which no writer of a contract writes (see JSON, above). The package exports each file of code by its path, the path of its.protofile with_pb.jsin the place of.proto:@altnovatrail/contracts/novatrail/observation/v1/observation_pb.js. It depends on@bufbuild/protobufat the exact version of theprotoc-gen-esthat wrote it. It carries the test vectors of the packages whose rules code on TypeScript follows, too, each exported by its path fromcontracts/:@altnovatrail/contracts/vectors/eval/v1/groups.json, the rules the device and the runner share. The vectors of the observation it does not carry: TypeScript gives no verdict. A release ofspeccarries it from the line 0.7 on, asaltnovatrail-contracts-<version>.tgz; its version is the tag ofspecwithoutv, and a consumer verifies it as it verifies@altnovatrail/spec.spec's checks build it and run it under TypeScript and Node.
9. Transport
appandapitalk by Connect: the server is connect-go, and the client connect-es. Every call is unary.- Between
appandapithe wire is binary protobuf: a new enum value reaches an older client as a number, while in JSON connect-es skips a name it does not know and reads the field as unset (see Versions, above). The server takes JSON too, for debugging, and writes it with the protobuf names. - Both sides skip the fields they do not know, so a client and a server within one major package understand each other.
10. The observation
- The observation is what AI read in a learner's work, answer slot by answer slot, before any check runs: the message
Observationof the packagenovatrail.observation.v1. A reader oftutorgives one, without the key.module-kitjoins two of them into one and gives the verdict on it.apipasses them from one to the other in its process and keeps the one joined. Which models read istutor's to decide, by eval, and the modesingle, in which one of the pair reads alone, is the operator's choice. - An answer slot whose answer AI reads is in the observation once, in the task's order: items by their place, answer slots by their place in the item, each named by its place (
AnswerSlotPlace).- On a handwriting sheet, these are the slots bound
anywhere,zoneandsheet(the module format's text, on the task). - On a workbook, every box. A box that the learner left empty sends no crop, and its reader gives it as blank without calling a model. The reader takes the boxes from the open view of the task, since the work lists only the filled ones.
- A slot bound
choiceis tapped, not read, and is not in the observation. Its value is the text of the option tapped (the module format's text, on checks), whichapigivesmodule-kitbeside the observation and keeps beside it.
- On a handwriting sheet, these are the slots bound
- A task whose answer slot is bound
sheet, an essay, is read by one reader, and so is a task from paper, by one model at a time of up to three in turn (see the contract betweenappandapi, below). Any other task that AI reads is read by two readers of one provider, in two calls: so in the reading modepair, the default. In the modesingle, which the operator of a deployment chooses at any rung, the admission of the pair's entry deciding, it is read by one reader, and its observation goes to the verdict as it is, with nothing to join.
What a reader gives.
- A reader gets the work — the crop of a handwriting sheet, or the crops of the filled boxes of a workbook — and the open view of the task, with the age category and the path to AI for admission. It gets no key, no solution of the task, and nothing of an answer slot's check: neither its kind nor the options of a choice written by hand. A statement that wants an answer in a form says so (the module format's text, on checks).
- For each answer slot it gives
value, what is written there, orunreadable, why it gives none.- A value is given only when the reader sees it in the writing itself, and as it is written: normalizing it is the check kind's, and
module-kit's, not the reader's. A fraction written with a bar is given on one line, numerator first, as the module format's checks say. A value is never empty, nor only white space: where nothing is written, the slot is blank. UNREADABLE_BLANK: nothing is written in the slot.UNREADABLE_ILLEGIBLE: something is written, and it cannot be read.UNREADABLE_AMBIGUOUS: what is written can be read more than one way. A digit written mirrored is such a case, as the module format's checks say; so is a value that the reader sees another reading of, and a value that the reader cannot point to in the writing.UNREADABLE_NO_FINAL_ANSWERandUNREADABLE_SEVERAL_FINAL_ANSWERS, only in a slot boundanywhere: AI finds no final answer in the work, or more than one, and the learner is asked to circle the answer (the module format's text, on the task).
- A value is given only when the reader sees it in the writing itself, and as it is written: normalizing it is the check kind's, and
- In a slot bound
sheet, the value is the text of the essay as it is written, the learner's mistakes kept; or the slot is blank, or illegible: the essay as a whole cannot be read. A word that cannot be read does not make the essay illegible; how the reader gives such a word is open (Т-37). The essay is read without the rubric, and the text goes to the rubric's assessment, without the picture. - The place.
crop_boxstands only in a slot boundanywhere: the box of the final answer on the crop that the device sent, in whole thousandths of its height and width, when the reader names one.tutor's adapter turns the provider's units into thousandths, and gives no box that is not valid: whole numbers from 0 to 1000,yminless thanymaxandxminless thanxmax. In a slot boundzoneand in a box of a workbook, the place is the answer slot itself. A group's label as a place comes only if the frames of the groups go with the work (Т-31). - The parts of a free writing, the other readings that a reader sees, and whether a digit is mirrored are the reader's own: they lead it to the value or the reason it gives, and the observation holds neither.
- An observation is valid when it holds every answer slot of the task that AI reads, each once and in order, and no other — neither a slot bound
choicenor a place the task does not have; each with a value that is not empty nor only white space, the characters with the Unicode property White_Space, as step 4 of the module format's numbers has it, or with a reason other thanUNREADABLE_UNSPECIFIED; when only a slot boundanywheregivesUNREADABLE_NO_FINAL_ANSWER,UNREADABLE_SEVERAL_FINAL_ANSWERSor acrop_box, and the box stands only beside a value and is valid; and when a slot boundsheetgives only a value,UNREADABLE_BLANKorUNREADABLE_ILLEGIBLE. A reason added to the package after a release ofmodule-kitis not valid to that release, asUNREADABLE_UNSPECIFIEDis not. Nor is an observation with a value that is not UTF-8: proto3 carries no such string, and the vectors none, but a structure of Go thattutorhands tomodule-kitwithin one process ofapican hold one. - An observation that is not valid is no observation: it is as a failure of AI (below), and no refusal of the server.
What is no observation. A failure of AI, an exhausted limit or quota, a refusal of admission and a refusal of the learner's own key are outcomes of the call, not observations. After such an outcome, every answer slot whose check gives a verdict and that AI reads gets unchecked, while an essay does not reach the assessment and its submission ends unchecked, which is no verdict; how the learner's app shows it is the contract between app and api. When the call of one of two readers ends in such an outcome, the reading gives no observation at all, not even the other reader's: the pair holds the verdict.
Joining two observations. module-kit joins the observations of two readers into one, answer slot by answer slot, before it gives a verdict. The first observation is that of the reader whom tutor names first in the pair.
- A value that the kind normalizes to nothing, such as
=undernumber, isUNREADABLE_BLANKbefore any pairing: withUNREADABLE_BLANK, or with another such value, it joins intoUNREADABLE_BLANK, and with a value or another reason intoUNREADABLE_AMBIGUOUS. - Two values join when the check of the answer slot compares them equal — as it compares a value with a trap value, after the same normalization (the module format's text, on checks) — and gives them the same verdict. The joined value is the first. So
0.5and1/2join undernumber, and07:30and7:30undertime, while2/4and1/2do not underfractionwithform: reduced, nor7:30and19:30undertime. A predicate compares the integers read:12and24do not join, though the predicate holds for both. Two values that are not in the kind's notation join when they are the same once normalized as the kind normalizes them — steps 1 to 7 of a number, its units dropped, and of a time, and a choice's normal form in lowercase —, so that7²and7³join, both a 7 and U+FFFD; a value in the notation and one out of it never join. - Beside a joined value, the joined
crop_boxis the first's, or, when the first gives none, the second's. A joined reason has none. - Two reasons that are the same join into that reason.
- Every other pair joins into
UNREADABLE_AMBIGUOUS: two values that do not join, a value and a reason, or two reasons that differ. The readers read the slot differently. - When either observation is not valid, there is no joined observation: as after a failure of AI, every answer slot that AI reads gets
unchecked. A slot boundchoicestill gets the verdict of the option tapped, and the item's verdict is made of all its answer slots'. - The observation of an essay has one reader and nothing to join, and so has every observation in the reading mode
single:module-kitgives the verdict on it as given, once it is valid, and one that is not valid is as a failure of AI.
The verdict. module-kit gives the verdict on the observation once the reading has ended, on the whole observation, not on parts of it while they come: each answer slot's, and then the item's, as the module format's checks make it of its answer slots'.
-
A value gets the verdict that the module format's checks give that value read, with its reason and its trap. A value that the kind normalizes to nothing is blank.
-
A reason gets
unreadable, with the reason of the verdict named after it. This holds in a slot whose check gives a verdict; an essay gives none (below).UnreadableReason of the verdict UNREADABLE_BLANKblankUNREADABLE_ILLEGIBLEillegibleUNREADABLE_AMBIGUOUSambiguousUNREADABLE_NO_FINAL_ANSWERno_final_answerUNREADABLE_SEVERAL_FINAL_ANSWERSseveral_final_answersblankis the module format's reason too, and so isnotation, which only a value gets: the check kind's. -
A slot bound
choicegets the verdict that the module format's checks give the text of the option tapped. -
A rubric gives no verdict. An essay with a value goes on to the assessment by the rubric; a blank or illegible one does not: its submission ends unreadable, which is no verdict either, and the learner writes the sheet again.
What is kept. api keeps the joined observation, or in the mode single the one reader's, with the values of the slots tapped, and the same release of module-kit gives the same verdict on them again, with no AI. The two readers' observations are not kept. Of an essay, api keeps no observation: the text read lives in the memory of the request and on the device. It keeps how each submission ended and, with feedback, the mark of each criterion (П-19).
Test vectors. The test vectors hold the rules of this section: contracts/vectors/observation/v1/<case>.json. spec's checks compute each, as a second implementation (just contracts-check), and module-kit's CI passes them all, from contracts.Vectors at the tag it takes.
- A vector is a JSON file:
description, what it holds;canvas, the task's canvas, anditems, the task's items, as the module format writes them, with the checks of their answer slots; andcases. - A case has its
description;observations, the readers' observations in the order of the pair — two, or one for an essay —, each written by the rules of JSON above, with every field, its zero too (EmitDefaultValuesofprotojson,alwaysEmitImplicitof protobuf-es), and a reason that the package does not know as its number; andvalid, whether each is valid. An observation that is not valid breaks one condition alone, so that the vector shows which. - Where the task has answer slots bound
choice,tappedlists each, in order, as{ answer_slot, value }: the text of the option tapped, as written, ornullwhen the learner tapped none. - A case of an essay has
submission:assessment, when the submission goes on to the assessment by the rubric,unreadableorunchecked. Every other case hasjoined, the joined observation, ornullwhen either observation is not valid, andverdicts, each item's in order: its answer slots' verdicts, each{ verdict, reason, trap }as the test vectors of verdicts of the module format write them, and its own. - The verdict of a predicate on a value in its notation is Starlark's, which
spec's checks do not run: they take the vector's, and onlymodule-kit's CI computes it. The join of two such values, which compares the integers read, they compute. - Together, the vectors give every reason of the table above in a joined observation, every check kind of the module format, an observation that is not valid and an option tapped. The check refuses a reason added to the package until the table above names it and a vector gives it.
11. The sample file
- The sample file is one sample of writing on a handwriting sheet or a page of a workbook, as the samples page of
canvassaves it on the device and the eval runner oftutorreads it: the messageSampleof the packagenovatrail.eval.v1, one JSON file to a sample. It holds no key of its task and nothing that AI read. What a sample is meant to say is its markup (below); which samples make an eval set, and how the runner reads them, are the rules of eval sets, and what the runner reports of a run, the runner's report, below; the rules that the device and the runner share — how the history of writing folds, the groups of strokes, the crop and how it draws the strokes' styles, how the tutor's marks snap and which box a stroke fills — have their own section below, with their test vectors. protocolnames the package,"novatrail.eval.v1". A reader reads it first, and reads a file of no other protocol. The version of the protocol is that of a contract (see Versions, above).idis the sample's ID: 1 to 64 lowercase Latin letters, digits and hyphens, so that it can name the sample's file. A person's sample gets one at random; a synthetic sample's comes from its seed, so that one seed gives the same file.
What a sample holds. Its purpose and who wrote it set which fields it holds:
purpose |
writer |
Strokes | writer_code |
license |
|---|---|---|---|---|
PURPOSE_EVAL_SET |
WRITER_ADULT, WRITER_ADULT_AS_CHILD |
geometry |
none | "Apache-2.0" |
PURPOSE_MEASUREMENT |
WRITER_ADULT, WRITER_ADULT_AS_CHILD |
history |
REQUIRED | none |
PURPOSE_MEASUREMENT |
WRITER_CHILD |
geometry |
REQUIRED | none |
- A child writes no sample of an eval set. A sample of an eval set has no writer's code, which would link published samples with each other, and names its license, under which
modulespublishes it. - The origin —
person, orsyntheticwith its seed, an unsigned integer of 64 bits in decimal digits — does not change which fields a sample holds, and a synthetic sample comes in each of the three. writer_codeis 6 to 16 digits and capital Latin letters, which the samples page makes at random;text_set_version, the version of the set of texts that the page showed, is 1 to 32 Latin letters, digits, dots and hyphens, and from the legal part on the set's ID and version joined by a hyphen, such aschild-sample-1(the legal texts, on the passport);canvas_versionis the version ofcanvaswhose samples page wrote the file,MAJOR.MINOR.PATCH. A file that the samples page did not write — a synthetic sample, a sheet recorded on a board, a sheet converted from an earlier file — hascanvas_version"0.0.0"andtext_set_version"none", which no samples page writes: no release ofcanvasis 0.0.0, and the page MUST NOT name a set of textsnone. A synthetic sample always has these two, since code, not the page, drew it.- No field holds a name, an email, an account, the device, the browser, the screen, a language, a date, an age or a class, and since a reader refuses a field the message does not have (below), none can be added.
- The history of writing is the events in the order they happened, each at its time on the sheet's clock, whole milliseconds never decreasing:
write, a stroke with its ID, unique and from 1, the type of the pointer that wrote it, its style, and its points, each across and down in units of the sheet to a tenth and at its time, which never goes back along the stroke, the last no later than the event's: a stroke is written when its last point is, or later, when another action landed while it was written (see the rules the device and the runner share, below);erase, the strokes the eraser took off whole;cut, the strokes an eraser that takes a part crossed, which it took off, and the pieces of them it left;clear, every stroke the sheet showed; andundo, the strokes it took off and those it put back. Erase, cut, clear and undo take off only strokes the sheet shows, and undo puts back only strokes written and not shown. The history holds no pressure: no input of a model takes it, and nothing is kept that nobody reads. - A stroke's style is how the learner chose it to look before writing it: its kind of pen —
PEN_KIND_PEN, whose line the device draws wider and finer by a pen's pressure or the pointer's speed,PEN_KIND_LINER, one width all along, orPEN_KIND_MARKER, one width, multiplied with what lies under it —, its colour, any of sRGB as#and six lowercase hexadecimal digits, its width in units of the sheet to a tenth, from 0.1 to 50, and its opacity in whole percent, from 10 to 100. A stroke of a history written before strokes had a style has none, and is drawn as the pen then drew: of the kind pen, black and opaque. The final geometry keeps each stroke's style, since the strokes shown are drawn by it. - A cut is one stroke of an eraser that takes only what it passes over: it names the strokes it crossed, at least one, in the order of the sheet, and the pieces of them it left, in that order and along each stroke — none of a stroke it covered whole. A piece is a new stroke: an ID no stroke had before, the ID of the stroke it was cut of,
of, one the cut names, that stroke's pointer and style, and a run of its points, with one point of its own at most at each end, where the eraser's edge crossed the stroke, at a time within the stroke's first and last. So the groups, the marks and the IDs stay those of whole strokes, and a reader that folds the history takes a piece as it takes any stroke written. - The final geometry is the strokes the sheet shows at the end, numbered by their place from 1, each with its points along the stroke in its canonical direction, to a tenth, and its style: no time, no pointer, no order of writing and nothing erased. The groups and the table of boxes name the strokes by these numbers.
- A sheet gives its width and height in units, the height of a digit that the module asks a crop to be drawn at, the groups of the visible strokes — labelled A, B and on by their place, every visible stroke in one, by the rule of groups — and their crops. A workbook gives the page's width and height, the same height of a digit, every box of the page in the task's order, each by its place (
AnswerSlotPlace) with its rectangle in whole units, and the filled boxes in the task's order: the IDs of the strokes in each, the table "box → stroke IDs" that the device built by the rule of boxes, and its crops. A workbook has no groups. In the final geometry of a workbook every stroke is in a box: the draft goes nowhere. - The crops of one set of strokes — the sheet's visible strokes, or a filled box's — are a
CropSet: the box of their points and h_med, the lower median of the heights of their bundles, both in whole tenths of a unit, and a crop at each height of a digit of eval, 16, 24, 32 and 48 px, and at the module's, by the height ascending. Each crop gives the height asked for and the height drawn, its size and margins in px, its scale, the width of its widest line, itssheet_box, the frames of the groups in the order of their labels — on a workbook none —, and its PNG. A sheet with no stroke has no crops. These numbers are those the rule of the crop gives the strokes the sample holds: the strokes a history shows at the end, or the final geometry, with the sheet's groups, or a filled box's strokes with none. - A history holds the strokes as they came, so its groups on a sheet and its table of boxes on a workbook are those the rules give the strokes it shows. The final geometry holds them no more as the device saw them — no time, and the points maybe other along a stroke —, so its groups and its table are the device's, and a reader does not compute them again.
- The task is named without its key: its source —
modules, by the tag of a release ofmodules, the module, its version and the digest of its package;tutor, by the tag of a release oftutor, the digest of its file of open tasks, the bank and the bank's digest; orfile, a file of tasks outside any release, by its digest, the bank and the bank's digest —, the task's ID, the seed of the instance when the task is a template, and the digest of its open view:sha256:and the SHA-256 of its canonical text, in 64 lowercase hexadecimal digits (the module format's text, on packages), of an instance with its numbers in place. The runner finds the key by them.
The markup. markup is what the sample is meant to say: the truth the runner compares what AI reads with. Every writer — the samples page, and the code that draws a synthetic sample — writes it into every sample. A file without it is still a sample, and a reader reads it, but the runner measures nothing on it (see eval sets, below).
- Who makes it follows from the origin and the writer, and the file says no more. An adult, writing in their own hand or imitating a child's, marks what they wrote, by what the samples page showed them before and while they wrote; for a child, an adult marks it after the writing, from what the child says; code marks a synthetic sample by what it drew. The page calls no AI, so a markup never follows what a model reads. The markup is made before the file is saved and does not change after it, but for the people's marks of an essay (below).
- Code that draws a synthetic sample gets no key of its task and knows no subject, so of its markup only what it drew is a truth: the truth of the answer slots, the parts with their texts and strokes, and the notes. A synthetic sample's
first_errorand an essay'smarksare what the code chose by its seed, as it chose the values it drew: they say nothing of whether the solution went wrong or the essay meets a criterion. A runner reads them as it reads any markup, and on synthetic samples the CI oftutorchecks only that its runner reads them; but a measure that rests on them — the assessment of the runner's report, or the analysis of a solution by its first error — measures nothing of AI on a synthetic sample, and the rule of admission counts none. truthis an observation (see the observation, above): every answer slot that AI reads, in the task's order, with its value as it is written, or the reason why a reader that reads right gives none — a digit written mirrored isUNREADABLE_AMBIGUOUS, as the observation's rules have it —, and with nocrop_box. On a workbook it names every box of the page, and a box that holds no stroke isUNREADABLE_BLANK; on a sheet that shows no stroke, every answer slot is. The outcome and the trap are not written: the runner gets them as the verdict on the truth, by the task's key (see the runner's report, below).notesset apart the answer slots whose rows the runner measures apart, ascending by place, each noting one at least:mirrored, a digit written mirrored, whose truth is thenUNREADABLE_AMBIGUOUS;crossed_out, something crossed out and written again.- On a sheet the markup gives one of two, and on a workbook neither, since its boxes are its places:
parts, the parts of a solution in the order it reads, each what the writer meant as one, a text or a drawing (by the glossary ofdocs/concepts.md), with itstext— a text as it is written, a drawing described in words, with every number and label on it — and its strokes. Every stroke the sheet shows is in one part, and the strokes that cross a part out are in it.crossed_outsays that the writer crossed the part out, so it is no part of the solution;illegible, that the part, or something in it, is written illegibly on purpose — or, in a child's sample, whose markup an adult gives from the child's words after the writing, and where only the writer would know what was on purpose, that it cannot be read even from those words;final_answer, that it holds the final answer of the task's answer slot boundanywhere, which is the one answer slot of its task (the module format's text, on the task), and a part crossed out holds none. One such part gives that slot a value,UNREADABLE_ILLEGIBLEorUNREADABLE_AMBIGUOUS, and two or moreUNREADABLE_SEVERAL_FINAL_ANSWERS; a truth ofUNREADABLE_NO_FINAL_ANSWERhas none.first_erroris the place, from 1, of the part where the solution went wrong, even when its calculation is right, and in a drawing too, but never a part crossed out; there is none when the solution did not go wrong.marks, an essay's: whether it meets each criterion, by the criterion's place in the rubric from 1, ascending, as the people who marked it agreed. A criterion they did not agree on has no mark, and the runner counts it nowhere. The essay's truth is its one answer slot, boundsheet: its text as it is written, orUNREADABLE_BLANKorUNREADABLE_ILLEGIBLE, and an essay that cannot be read has no mark, since it reaches no assessment. The marks come after the writing: the organizer of the eval set or of the measurement adds them once the people have agreed, before the sample goes into a set or a run, and code marks a synthetic essay. How many people mark an essay, and how they agree, is the volunteer's form's to say (П-16).
- What only the task holds, the runner holds: that the truth is a valid observation of the task and gets a verdict, that a final answer stands only where the task's slot is bound
anywhere, and that the marks name criteria its rubric has (see eval sets, below).
Writing and reading.
- A writer writes the file by the rules of JSON above, with every field, its zero too (
EmitDefaultValuesofprotojson,alwaysEmitImplicitof protobuf-es), as the test vectors of the observation are written. - A reader reads it strictly: a field that the message does not have is refused, as
protojson.UnmarshalandfromJsonrefuse one by default, while the transport skips one. So a file of a later tag ofspec, with a field added, is refused by a reader of an earlier one, which names the field, until the reader takes the later tag. - A crop's PNG is an image of 8 bits, not interlaced, of the crop's width and height — grey, colour type 0, when none of the strokes it draws has a style, and RGB, colour type 2, when one has —, whose IDAT is one zlib stream with nothing after it, each row with a filter of PNG, 0 to 4; and its chunks are IHDR, IDAT and IEND alone: no ancillary chunk, neither tEXt, iTXt, zTXt, eXIf and tIME, which hold text, metadata and a time, nor any other, a private one too. A decoder may skip an ancillary chunk, so nothing of the crop is in one.
- A sample that breaks a rule of this section is not valid, and a reader refuses it.
Where a sample goes.
- A sample of measurement by an adult goes to the organizer of the measurement, outside git and outside the platform's server, and from there to the providers of AI that the measurement names (П-18).
- A sample of an eval set goes to the organizer of the eval set, who adds it to a module's eval set in
modules, where it is published under Apache-2.0 and never withdrawn (П-16). Its markup is published with it, the texts of its parts and an essay's truth too, so the organizer looks for a name in them as on the sheet. - A sample of a child lies outside every repository, in the operator's closed bucket, with a separate consent, for two years from its session. A runner MUST NOT send a sample whose writer is
WRITER_CHILDto a provider of AI until the admission table admits to that provider the work of a child under 13, the strictest category, since the file holds no category. - No sample goes to the platform's server.
Checking a sample. A repository other than spec checks its sample files by the code that holds the examples below to this section, at the tag of spec it pins, and MUST NOT write a check of its own: just -f spec/justfile sample-check <file>…, from its root, in its toolchain stage.
- Each path is the repository's, from the folder the check runs from, its root: a path that leaves it, a link in it that leads out too, or a path that names no file stops the check before it reads any, and a file named twice is read once.
- The message is the one of the image buf builds of the
contracts/of the repository'sspecsubmodule. buf reaches no service, sincebuf.yamlhas nodeps, and no key is needed, so a pull request from a fork runs the check too. - Each file is read and held to this section and to the rules the device and the runner share as an example is, and nothing is asked of the files together but in the mode of a module's eval set (below). A rule a file breaks is named by its file and line,
file:line: message, and the check exits with the status 1. A path it refuses, an image buf cannot build or one with noSample, and a call that names no file stop it with the status 2: a check of no file passes none. - The files are read one at a time: only the file being read is held whole, and of a file read only what the files together are held to stays — its ID, and for
report-checkwhat a report is held to of it, its markup among it —, so that one call checks a module's eval set of hundreds of large samples with no batches. - A module's eval set:
just -f spec/justfile sample-check --eval-set <module> <file>…, with the module's ID,<publisher>/<name>, and the files of its foldereval/. Each file is checked as above, and the files that hold are held together to the rules of eval sets that need neither the module's package nor a key: each is of the purposePURPOSE_EVAL_SET, with its markup, of a task whose source ismoduleswith that ID, and no two share an ID. That the files are the whole set, the task itself and the digest of its open view are not checked: the repository names the files, and the runner checks the task by the package. An ID that is no module's stops it with the status 2, as a call that names no file does.
Examples. contracts/examples/eval/v1/<case>.json, but those whose case begins with report-, a runner's report, holds synthetic samples, each with its markup.
- One of each row of the table above: a sheet of measurement by an adult, a sheet of an eval set by an adult imitating a child, and a workbook of measurement by a child. Their strokes come from the test vectors of
canvas, and their groups, crops and PNG from the code ofcanvas, at its commit 602945b. - Two more: a sheet of measurement by an adult whose solution has a drawing, a number line with its first error, and an essay of an eval set by an adult, with the people's marks. Their strokes were drawn by the synthetic hand of
tutorat its tag v0.1.1, their groups and the numbers of their crops come fromspec's implementation of the rules the device and the runner share, and the pixels of their crops from the code ofcanvasat 602945b, whose numbers are the same. - One more: a sheet of measurement by an adult in styles — «123» in liner and in pen and an underline in marker, which an eraser that takes a part cut short. Its strokes were drawn for
spec, its groups and the numbers of its crops come fromspec's implementation of the rules the device and the runner share, and the pixels of its RGB crops were drawn by those rules outside the repository. - None was written by the samples page, so each has
canvas_version"0.0.0"andtext_set_version"none". - They answer tasks of the file of open tasks of
tutorv0.1.1, and each markup says what its strokes show, which is not always a right answer to its task.
spec's checks hold each to this section and to the rules the device and the runner share (just contracts-check), and Go reads each back as it is written (the test of the module of the contracts). Together they show every purpose, writer, ink, surface and event of the history, a stroke with a style and one without, every kind of part, parts and marks, a first error, a final answer and a workbook's truth; the check refuses a purpose, a writer or a kind of part added to the package until this section names it.
12. The rules the device and the runner share
- The device,
canvas, and the eval runner oftutorfollow the same rules of the strokes on a sheet and a page: how a history of writing folds, which strokes make a group, how a crop is drawn, which strokes a box of a model takes, and which box of a workbook a stroke fills. They arecanvas's rules as it wrote them, and every writer and reader of a sample file follows them. - Every rule counts in whole numbers. A place is taken in whole tenths of a unit,
round(10 × v), a half rounded up: 100.05 units are 1001 tenths. A time is taken in whole milliseconds,round(t), a half rounded up too. After that a rule only adds, subtracts, multiplies and compares, and each number that is not whole is one division of two whole numbers. Every whole number stays below 2^53, so a double holds it exactly, and so does anint64, and IEEE 754 rounds each division alike in every language. A sample writes its places to a tenth and its times whole, as the sample file says, so the rules round nothing of a sample.
The history of writing. A history folds into the strokes the sheet shows at the end by adding and taking off IDs alone, with no rule of the stack of undo: write adds its stroke, erase and clear take off the strokes they name — a clear reads as an erase —, cut takes off the strokes it names and adds its pieces, and undo takes off the strokes it removed and adds back those it restored: of a cut, the pieces, and the strokes it cut.
- The history the element keeps holds one event more,
tutor, the tutor's act in grown-up mode: it adds its strokes, new IDs of the pointer "tutor", and takes off the strokes it names, and an undo of it takes off its strokes and adds back those it took off. A sample file never holds one — its messageHistoryEventhas no such event —: the tutor's strokes are no learner's writing. - A stroke is written when its last point is, or later: a stroke that ended without its pointer coming up, while another action landed, lands no sooner than that action, so that the events stay in the order of their times.
- The history the element
<novatrail-canvas>keeps,HistoryEventof@altnovatrail/spec/canvas, is that of a sample written otherwise: its event'skindis the field the event sets, itstist_ms, a stroke'skindis itspointer, a style'spenisPEN_KIND_and its kind in capitals, a piece'sofandstrokeare its own, and a point'stitst_ms, each time rounded to a whole millisecond. A point's pressure,p, does not go into a sample; the element keeps it to draw the width of a pen's line, and never makes it up: without a pen's pressure, the width of a line of the kind pen comes from the pointer's speed, by the times of its points.
The groups of strokes. The groups are made of the strokes the sheet shows at the end, each with its points and their times.
- A stroke's box is the box of its points, in tenths, and its span runs from the earliest time of its points to the latest.
- Two strokes are neighbours when the pause between them is no more than 2000 ms and the gap between their boxes no more than 500 tenths, 50 units, across, and no more than 500 tenths down. The pause runs from the end of the earlier's span to the start of the later's, and is 0 when the spans overlap; a gap is 0 where the boxes touch or overlap. Each bound is in.
- A group is the strokes that a chain of neighbours joins. The groups are labelled by their place, A to Z, then AA, AB and on: by the box of the group's points in tenths — its top, then its left, its bottom and its right —, then by the earliest start of its strokes, then by its least ID. A group names its strokes' IDs ascending.
- A stroke written and not shown at the end — erased, cut, cleared or taken off by an undo — is in the groups of the strokes shown that would be its neighbours, by the same rule with its own box and span: in none when it would neighbour none, and in each of two groups when it would neighbour a stroke of each.
tutor's runner counts by it what was erased, and in which group.
The crop. The crops of a set of strokes are drawn from their points, with their groups — on a workbook, none —, at each height of a digit D asked for, a whole number of px from 1 to 256.
- B is the box of all their points, in tenths.
- A stroke whose points span 150 tenths, 15 units, or more from top to bottom is in a bundle; a lower one is a line — a dot, a minus, the bar of a fraction, an underline — and joins nothing. Strokes whose boxes touch or overlap, a gap of 0 both across and down, are one bundle, by a chain, whatever their times. A bundle's height is that of the box of its points.
- h_med is the lower median of the heights of the bundles, the ⌊(n − 1) / 2⌋-th from the lowest, in tenths, or 150 when there is no bundle. The scale takes H = min(h_med, 1000). The rule takes printed lowercase letters as it takes any stroke: each is a bundle about half a digit tall, and where they are half the bundles, h_med falls to their height.
- A stroke's line on a crop drawn at D′ is N / (12 × H) px wide: without a style, N = H × max(D′, 12), the line max(D′, 12) / 12 px; with a style of width W, in whole tenths, N = 12 × max(W × D′, H), the line its width at the crop's scale and 1 px at least. A pen's line is drawn at its width, with no pressure and no speed. A set's widest line has the largest N, N_max.
- D′, the height drawn, is the first from D down for which the crop fits: with the margin m = max(12, ⌈N_max / (24 × H)⌉ + 1) px, half the widest line and a pixel, 12 px at least, w₀ = ⌈(B.xmax − B.xmin) × D′ / H⌉ + 2 × m and h₀ = ⌈(B.ymax − B.ymin) × D′ / H⌉ + 2 × m, the width is max(w₀, 200) and the left margin m + ⌊(width − w₀) / 2⌋, and the height and the top margin alike; it fits when max(width, height) ≤ 1568 and ⌈width / 28⌉ × ⌈height / 28⌉ ≤ 1568, the limits taken from Claude's standard size of an image. At D′ = 1 a crop always fits.
scale, s, is 10 × D′ / H px to a unit, andline_widthis N_max / (12 × H) px.sheet_box, where the crop with its margins lies on the sheet, in units, is [(B.ymin × D′ − top × H) / (10 × D′), (B.xmin × D′ − left × H) / (10 × D′), (B.ymin × D′ − top × H + height × H) / (10 × D′), (B.xmin × D′ − left × H + width × H) / (10 × D′)].- The frame of a group, with g the box of its points in tenths, r = N + 24 × H for the largest N of its strokes, X(x) = 24 × ((x − B.xmin) × D′ + left × H) and Y(y) = 24 × ((y − B.ymin) × D′ + top × H), is [⌊1000 × (Y(g.ymin) − r) / (24 × H × height)⌋, ⌊1000 × (X(g.xmin) − r) / (24 × H × width)⌋, ⌈1000 × (Y(g.ymax) + r) / (24 × H × height)⌉, ⌈1000 × (X(g.xmax) + r) / (24 × H × width)⌉] in whole thousandths of the crop: the group's ink, its points widened by half its widest line and the pixel at its edge, rounded outward, so that every pixel the ink touches lies within it, and its min is less than its max.
- A crop is drawn on white, its strokes by their IDs ascending, each a line through its points, round at its ends and joins, of its line's width, laid as one layer, so that where it crosses itself it is no darker: a stroke without a style black and opaque; of the kind pen or liner, its colour at its opacity over what lies under it; of the kind marker, what lies under it multiplied by its colour, at its opacity.
- The rule gives the numbers of a crop, not its pixels: two implementations may draw a crop a level of a channel apart. The form of a crop's PNG is the sample file's.
Snapping. A tutor's mark on a sheet takes the strokes that a box of a model, on a crop of the work, snaps to. The box is in whole thousandths of the crop's height and width, a CropBox as the observation writes it, and the strokes are those of the submission, of its groups: a stroke written after it is in none, and no box takes it.
- With the crop's D′, width w and height h, its margins my at the top and mx at the left, and B and H of its set, a point (x, y) in tenths lies on the crop at X = 1000 × ((x − B.xmin) × D′ + mx × H) and Y = 1000 × ((y − B.ymin) × D′ + my × H): its place in px, times 1000 × H.
- The box widened by 250 thousandths of D′ holds the point when (xmin × w − 250 × D′) × H ≤ X ≤ (xmax × w + 250 × D′) × H and (ymin × h − 250 × D′) × H ≤ Y ≤ (ymax × h + 250 × D′) × H, its edges in. That is the box laid on the sheet by
sheet_boxand widened there by H / 4; it widens first, and is clipped to the sheet after. - The box takes a stroke when it holds k of its n points with k ≥ 1 and 3 × k ≥ 2 × n: two thirds of them at least. What it gives is the IDs of the strokes taken, ascending, and the box of their points, in tenths; or none, when it takes no stroke, and the mark then has no place on the sheet.
- The margin, 250, and the share, two thirds, are parameters of eval: eval may choose them anew by its own data.
- Snapping takes the strokes as they came: on the device, those of the submission; in eval, those a history of writing shows. The final geometry of a sample is no input of it: its points along a stroke may be other than those that came, as the sample file allows, so a box holds another share of them than of the strokes as they were written, though their boxes, groups and crops are the same. So eval chooses the margin and the share, and measures snapping, on samples with a history alone.
The boxes of a workbook. A stroke on a workbook's page is in one box or in none — the draft —, each stroke by itself and with no time. A box's L, T, W and H are its left, top, width and height in tenths, 10 × those of its PageBox, and x0, x1, y0 and y1 the least and the most of the stroke's points in tenths.
- A box holds the stroke when its size and its middle do: 1000 × (x1 − x0) ≤ 1600 × W and 1000 × (y1 − y0) ≤ 1600 × H; and 2 × (1000 × L − 120 × W) ≤ 1000 × (x0 + x1) ≤ 2 × (1000 × (L + W) + 120 × W), and the same down with y, T and H.
- Of the boxes that hold it, the stroke's is the one with the most of its points in the box widened by 120 thousandths — 1000 × L − 120 × W ≤ 1000 × x ≤ 1000 × (L + W) + 120 × W, and the same down —, and of those the earliest in the task's order, by item, then by slot. A stroke no box holds is the draft.
- A box is filled when it is a stroke's box. The table "box → stroke IDs" lists the filled boxes in the task's order, the IDs of each ascending. The draft goes into no box and onto no crop.
Test vectors. The test vectors hold these rules: contracts/vectors/eval/v1/, four files, each { description, rule, cases }. rule gives the numbers of its rule above. Each case is { name, description, … }, its name unique in its file and in kebab case, with the input of the rule and what the rule gives: messages of the package written in JSON as the rules of JSON above have it, with every field, its zero too, and beside them what no message holds. Their sheet is canvas's, 1000 units across and 1400 down, and so is a workbook's page; every point lies on it.
groups.json:history, aHistory;visible, the IDs of the strokes the sheet shows at the end, ascending;neighbours, the pairs of them that are neighbours,[a, b]with a less than b, in order;groups, each aGroup, andgroup_boxes, the box of each group's points, aTenthsBox; anderased, each stroke written and not shown, by ID ascending,{ stroke_id, labels }, the labels of its groups in their order.crops.json:digit_height, the module's;strokes, each aFinalStroke, andgroups;bundles, the IDs of each bundle, ascending, the bundles by their least ID; andcrops, aCropSet, its PNG empty: the vectors hold no pixels.snaps.json:digit_height,strokes,groupsandcrops, as incrops.json; andsnaps, each{ digit_height, box, stroke_ids, snapped }: a box of a model, aCropBox, on the crop drawn at that height, the IDs of the strokes it takes, and the box of their points, aTenthsBox, ornull.boxes.json:boxes, the page's, each aPageBox, in the task's order;strokes;verdicts, each stroke's box by its ID,{ stroke_id, answer_slot }, anAnswerSlotPlaceornull; andfilled_boxes, each aFilledBoxwithout its crops.- The cases are those of
canvas's vectors at its tag v0.1.2, commit 8e9c6f6, written in this form, a history without pressure and in whole milliseconds;groups.jsonadds the groups of the strokes taken off, whichcanvasdoes not draw, and cases of its own. The cases of strokes with a style and of a cut — the last two ofgroups.jsonand ofcrops.json— arespec's own, computed by its implementation, untilcanvaswrites its own. spec's checks compute each, as a second implementation (just contracts-check).canvas's CI passes them all, from the npm package@altnovatrail/contracts, andtutor's, fromcontracts.Vectors, each at the tag ofspecit takes.- A rule changes only in
spec, by a task that changes this section, the vectors andspec's implementation together;canvasandtutorbring a change as a row «в реестр spec» of their RUN.md. A change that gives another result for the same input — another group, another number of a crop, another stroke taken or box filled, the margin and the share of snapping too — changes what the package means, and comes as a new package, as the rules of versions say. A case that pins what this section says already only adds. - Together, the vectors give a history with each event that takes strokes off, a cut among them, a stroke taken off in no group and one in two, a crop with no bundle, one with h_med above 1000, one drawn below the height asked, one of strokes with a style and one whose margin a wide line widens, a box of a model that takes strokes and one that takes none, a stroke of the draft and a filled box.
13. Eval sets
-
An eval set is samples, each a sample file with its markup, on which the eval runner of
tutormeasures how AI reads work. A model is admitted for a capability of AI once it passes the eval set of the capability and the eval sets of every published module with that capability; the rule of admission — its bounds, its targets, how many repeats — istutor's. -
A module's eval set is every file in its folder
eval/, at any depth, whose name ends in.json, letter case and all; a file or folder whose name begins with.is no part of it, as it is none of the module by the module format's rules of a module. Any other file ineval/is no sample, and the runner reads none. Where the samples lie withineval/is for the repository that holds the modules to decide: the layout of a module lets it hold any file ateval/<path>, and the format does not change.- Each file is a sample of the purpose
PURPOSE_EVAL_SET, with its markup, of a task of its own module: its source ismodules, with the module's ID. No two samples of a set share an ID. These rules need neither the module's package nor a key, andsample-check --eval-setholds them, as the CI ofmodulesruns it on every pull request, from a fork too (see "Checking a sample" in the sample file, above); the rules below that need the package are the runner's. - The eval set is no part of the module's package, by the module format's rules of packages: a new sample changes neither a verdict nor a digest, and the runner takes the samples from the module's folder at the commit it checks.
- Each file is a sample of the purpose
-
The task. Of a module's eval set, the runner takes a sample's task from the package that
module-kitbuilds of the module at the commit checked — in the CI ofmodules, the pull request's —, by the task's ID and, of a template, the seed. The tag, the version and the package's digest that the sample names say only what it was made on, and are not compared, but the digest of the task's open view MUST be the sample's. Of any other eval set, the runner takes the task at the source and the digests that the sample names. -
Refusal. The runner refuses a sample, sends nothing of it to AI, and names it in its report with the reason (see the runner's report, below), when:
- it breaks a rule of the sample file or of the rules the device and the runner share, which the runner holds by the same code as
sample-check, or its markup does not fit its task: a truth that is no valid observation of the task or gets no verdict, a final answer where the task has no slot boundanywhere, a mark of a criterion its rubric does not have; - it has no markup;
- its task is not the one it names: no such task, in a module's eval set a task of another module, or an open view of another digest;
- a child wrote it, until a contract with the provider admits children (П-3).
A run of a module's eval set that refuses a sample does not pass, and neither does the pull request it checks. A pull request that changes the open view of a task re-makes or removes its samples in the same pull request.
- it breaks a rule of the sample file or of the rules the device and the runner share, which the runner holds by the same code as
-
A capability's eval set is
tutor's: samples of any purpose, of tasks of any source, by their tags and digests. Where it lies and what it holds istutor's to decide, and samples of measurement and of children stay outside git (П-10 and П-18). A capability whose input is no sample — the tutor's words, with their points on gender and safety — has an eval set of its own form,tutor's too.
14. The runner's report
- The runner's report is what the eval runner measured in one run of an eval set, for one capability of AI: the message
Reportof the packagenovatrail.eval.v1, one JSON file to a run, written and read as the sample file is (see "Writing and reading" in the sample file, above). It holds no value, text, stroke or crop of any work: only the IDs of samples, places, verdicts and marks. The CI ofmodulesreads it, and so doestutor's rule of admission; the log of a run, with what each model answered, and the reports for people, in Markdown or CSV, aretutor's own. protocolis as in a sample file;runner, the tag of the release oftutorwhose runner made the run;capability,CAPABILITY_HANDWRITING_READING, reading the values of the answer slots on a sheet or a workbook, orCAPABILITY_RUBRIC_ASSESSMENT, assessing an essay by its rubric on the whole path: the essay read, and what was read assessed. A run of reading measures no essay, and a run of assessment nothing but essays.readersare the models that read, each by its provider and by the model as the list of admitted models names it, with its setting: in a run of reading the two of a pair, in its order, or one; in a run of assessment one, besideassessor, the model that assessed.verdictsnames the code that gave the verdicts, with the tag of its release:VERDICT_CODE_MODULE_KIT, as in the platform's work, orVERDICT_CODE_RUNNER, the runner's own. Only a report whose verdictsmodule-kitgave admits a model; one of the runner's own code is a measurement.- The eval set is
module, a module's, by its ID and the commit ofmoduleswhoseeval/was read, orcapability_set, a capability's, by the nametutorgives it;repeats, how many times each sample was read. samplesholds each sample of the set that the capability measures, ascending by ID, withrefusedand the reason of its refusal, as eval sets have it —REFUSAL_INVALID,REFUSAL_NO_MARKUP,REFUSAL_OTHER_TASKorREFUSAL_CHILD—, ormeasured:- in a run of reading, each answer slot that a model reads and whose check gives a verdict, in the task's order — on a workbook its filled boxes, since an empty box goes to no model, and on a sheet that shows no stroke none, since it has no crop and nothing of it goes to a model, so that it is measured with no answer slot, as a page with no filled box is:
truth, the verdict on the truth of the markup;mirroredandcrossed_out, its notes; andreadings, one for each repeat, in order: the verdict on the observation of the readers, joined when they are two, as the observation joins them, and besideuncheckedalone its cause,UNCHECKED_CAUSE_FAILUREwhen AI failed,UNCHECKED_CAUSE_LIMITwhen a limit or a quota ran out,UNCHECKED_CAUSE_INVALIDwhen an observation is not valid, orUNCHECKED_CAUSE_CHECKwhen the check of the answer slot gave no verdict on a valid observation — its predicate gave an error or a result that is not abool, or ran to its bound of steps or to the clock of the code that gives the verdicts, as the module format's checks have them; - in a run of assessment,
essay:truth, set only when the truth holds no text,UNREADABLE_BLANKorUNREADABLE_ILLEGIBLE;people, the marks of the markup; andreadings, one for each repeat:assessment, when AI marked one criterion of the rubric at least, with the mark it gave each criterion the people marked, in their order — met, not met or none, so that each is none when AI marked only criteria the people did not agree on —;unreadable, the essay read as blank or illegible; oruncheckedwith its cause, among themUNCHECKED_CAUSE_NO_MARK, an assessment that marked no criterion of the rubric, and neverUNCHECKED_CAUSE_CHECK: a rubric has no predicate.
- in a run of reading, each answer slot that a model reads and whose check gives a verdict, in the task's order — on a workbook its filled boxes, since an empty box goes to no model, and on a sheet that shows no stroke none, since it has no crop and nothing of it goes to a model, so that it is measured with no answer slot, as a page with no filled box is:
- A verdict is written as the test vectors of verdicts of the module format write one:
verdict,correct,not_yet,unreadableorunchecked;reason, besideunreadablealone; andtrap, the trap that a wrong value shows, besidenot_yetalone; each empty where there is none.
The measures. A report holds no totals: the measures are counted from its records, all repeats together, by these rules, and any reader can count them again. T is the verdict on the truth, and R the verdict on a reading.
- In a run of reading, the unit is an answer slot in one repeat.
- False alarm, the main measure: R is
not_yet, and T is not. Its share is among the readings whose T is notnot_yetand whose R is notunchecked. A digit written mirrored, whose T isunreadable, counts in it. - False correct: R is
correct, and T is not; among the readings whose T is notcorrectand whose R is notunchecked. - Needless "unreadable": R is
unreadable, and T iscorrectornot_yet; among the readings whose T is one of those and whose R is notunchecked. - "Unreadable" kept: T and R are both
unreadable; among the readings whose T isunreadableand whose R is notunchecked. - Another trap: T and R are both
not_yet, with different traps; among the readings whose T and R are bothnot_yet. - Unchecked: R is
unchecked, by its cause; among all the readings.UNCHECKED_CAUSE_CHECKis the task's, not the model's: a predicate that fails on a value the model read is a flaw of the module's condition, and the measure, counted by its cause, does not lay it on the model. - Each measure is counted apart too on the answer slots noted
mirrored, and on those notedcrossed_out.
- False alarm, the main measure: R is
- In a run of assessment, a reading of an essay whose truth holds its text, and which ends
unreadable, is needless, among those that do not endunchecked. The unit of the rubric is a criterion that the people marked, in a repeat whose essay was assessed, and which AI marked met or not met:- False alarm, the main measure: AI marks the criterion not met, and the people met. Its share is among the people's marks met, by criterion and in all. AI's marks of none are counted apart.
- Agreement: the share of AI's marks that are the people's.
- Cohen's kappa, for each criterion: (p_o − p_e) / (1 − p_e), with p_o the agreement, and p_e the sum, over met and not met, of the share of the people's marks and the share of AI's that are it, multiplied; when p_e is 1, there is none.
- The bounds of a share, its target and how many repeats a run takes are the rule of admission's,
tutor's. So are the measures of the other capabilities, such as the analysis of a solution by its parts and its first error, and a hint: the markup holds their data. Of a synthetic sample, the first error and an essay's marks are its code's choice, and the rule of admission counts no measure on them, as the sample file says.
Where a report goes. A report names its models and their providers. A run of an eval set at a provider, and a report of it published, follow that provider's terms: beyond OpenAI and Anthropic, some providers forbid benchmarking, and one its publication without consent. A log of CI that anyone can read publishes what it prints. A report that names samples of measurement or of a child is not published: it lies where they do (П-10 and П-18).
Examples. contracts/examples/eval/v1/report-<case>.json holds synthetic reports of the samples beside them (see the sample file's examples, above): a run of reading on a capability set of those samples, which refuses the child's, and a run of assessment of the essay, in three repeats. No runner made them: their runner and the code of their verdicts are v0.0.0, their models are stand-ins named example, and their readings are made up; the verdict on each truth is the one the check number gives with the key of its task in tutor's bank at v0.1.1. spec's checks hold each to the form of this section and, once the samples beside it hold their own rules, to them: it names each that its capability measures, and only those, a child's is refused as such, the answer slots are those of the truth that a model reads — none on a sheet that shows no stroke —, with its notes, and an essay's people's marks are its markup's. Go reads each back as it is written. Together they show every capability, a refused and a measured sample, every verdict a reading gives and every mark AI gives a criterion, and the check refuses a value that the package adds to an enum of the report until this section names it.
Checking a report. A repository other than spec checks its files of the runner's report by the code that holds the examples above to this section, at the tag of spec it pins, and MUST NOT write a check of its own: just -f spec/justfile report-check <report>… [--samples <sample>…], from its root, in its toolchain stage. Each report is read strictly, by the image buf builds of the contracts/ of its spec submodule, and held to the form of this section. With --samples, each sample named after it is checked as "Checking a sample", in the sample file, checks it, one file at a time, no two of them have one ID, since a report names a sample by its ID, and, once all of them hold, each report is held to them as the examples are held to the samples beside them: a report on a capability set names every one of them that its capability measures, and each sample a report names is one of them. Its paths and statuses are those of sample-check, and so is its line file:line: message for each error, while its last line, report-check: ok — … or report-check: <n> errors, is its own. The measures are not checked: the runner counts them (above).
15. The contract between app and api
- The contract between
appandapiis the packagenovatrail.api.v1: the services thatappcalls onapiby Connect, one package for all of them, with one list of causes. This section is its text: the checking of an attempt,AttemptServiceofattempt.proto; the account and its profiles,AccountServiceofaccount.proto; and the way from a module to a task — what a package gives by its digest,PackageServiceofpackage.proto, the modules of a learner,ModuleServiceofmodule.proto, the engine's choice, the preview of the goal for the tutor, the beginning of an attempt and lessons,LearningServiceoflearning.proto, and the skill map, the cognitive map with its history and indicators, the adult's progress and the adult's correction of a module's level,ProgressServiceofprogress.proto; the legal texts,LegalServiceoflegal.proto; the stored works,WorkServiceofwork.proto; and the task from the learner's paper,PaperServiceofpaper.proto; and the debug mode,DebugServiceofdebug.proto.cause.protoholds what they share: the causes, and the values that come both in answers and in refusals. Which requests there are, with what comes and goes in each,api's detailing proposed; what both sides know is the contract's, and howapikeeps it isapi's code: the order of its checks, its records of idempotency keys and how long they live, the reserve of its quota, CORS, its codecs and which place the program gives a mark. - Every request on an attempt, a lesson run or an engine's choice names the profile,
profile_id, and the attempt, the run or the choice by its ID:apireads each by the pair. One of another profile, or none, getsCAUSE_NOT_FOUND, and a profile that is not the account'sCAUSE_NO_PROFILE. A request whose form the contract refuses — a field it needs left out, a place the task does not have, a method the task's kind does not take — gets the codeinvalid_argumentwith noRefusal.
Refusals and outcomes.
- A request that was not done is refused: an error of Connect with the standard code that the cause's comment gives, and the detail
Refusal, its cause and what it tells beside it. A method's comment names its refusals. - A request that was done answers, and the answer says what changed for the learner. A call of AI in it that gave no reading or no words is an outcome,
Outcome, in the answer, not a refusal: a failure of AI, the quota with when the next family day begins, the limit of platform AI, no admission, and of the learner's own key the limit reached, with why, or the key refused. "Explain differently" is the one request on an attempt that makes no call of platform AI without the reserve of the quota: there the quota, the limit of platform AI and no admission are refusals, and the right to it on the rung stays. - A request's message larger than
apireads — 11 MiB, so that the scan of a consent form, up to 10 MiB, fits with its request — gets the coderesource_exhaustedwith noRefusal, before it is parsed;PutWorknames howappreads it. Causeis one list for both: why a request was refused, or what a call of AI came to. A verdict's reason is no cause: it is the module format's and the observation's. Why an attempt was closed,CloseReason, how a lesson run ended,RunEndReason, and how a submission of an essay ended,SubmissionEnd, are values of their own, which come in answers and in the data of a refusal.- A cause that the build of
appdoes not know, it reads by the code of the error; an outcome it does not know, as a failure of AI. It words neither: the words areapp's, in the language of its screen, and the server sends no text of a cause.
Sign-in. Every request carries the ID token of the sign-in service in the header Authorization, as Bearer <token>; only the open views of PackageService, the files of a package's device part and the legal texts of LegalService go without one (below). The comment of AccountService names the refusals that every request with a token may get, and what app does on each:
appreads the cause of a refusal before it refreshes any token.unauthenticatedwith noRefusal— the token has expired, is revoked, or its user is disabled:apprefreshes the token and repeats the request, and opens the sign-in window only if the refresh failed. Signing in again is signing in as the same user, without signing out, since signing out erases everything of the account on the device.CAUSE_FRESH_SIGN_IN_NEEDED, alsounauthenticated: the action needs a sign-in no older than the refusal'smax_auth_age_seconds.appsigns in again by the window, on a press, and repeats the action. Whether a sign-in is fresh it reads by theauthTimeof a token it has just refreshed, against that token'sissuedAtTime, not against the clock of the device; onauth/user-mismatchit asksGetAccount.CAUSE_ACCOUNT_GONE, alsounauthenticated, with no data: the account is being deleted or was deleted, or the sign-in service has no such user.apperases everything of the account and signs out, without refreshing the token: a refresh would sign the deleted user out with the error of a revoked token, and the device would not know why.CAUSE_NO_ACCESS: the user has no account, and may only create one. While the registry of the device holds an account, it means that another account has signed in, andapperases what is left of the one before it opens anything.unavailablewith noRefusal: the token could not be checked, andapprepeats the request after a growing pause, for a short while.- A request without the right it needs gets the code
permission_deniedwith noRefusal. A method on a profile names its right,can_manage,can_learnorcan_view, which lets an adult view the skill map, the cognitive map, the progress and the share of the quota; a method on the account itself — the PIN, the creation of a profile, the account's export and deletion — needs the account of the token alone: it is an action of an adult, and the PIN in front of it is a barrier of the interface. The fresh sign-in is checked last, after the right.
Versions and origin.
appreads the major package it was built with, as the rules of versions say, andapiholds the current one and the one before. A method thatapino longer holds answersunimplemented, and only then, or for an open view in a version of the module format that its build does not read, or for a part of the export in a version its build does not write, doesappoffer to reload. The contract names no version ofapi: inside the major package an older build works with a newerapi.- A value of an enum that its build does not know
appreads as the comment of the enum says, and never writes it back: a change of a profile sends only the fields that changed. apistands on the origin ofappor on its own (Т-17). On its own, it answers CORS to the exact origin ofappon every path and every answer, errors among them, and exposesRetry-After. A request carries no headers butAuthorization,Content-Type,Connect-Protocol-VersionandConnect-Timeout-Ms, so whatever else a request says is a field of its message. How long a preflight's answer lives, and where the origin is configured, areapi's.
The idempotency key. A request that must not be done twice carries idempotency_key, a field of its message, since CORS lets through Authorization and the headers of Connect alone: SubmitWork, SubmitEssay, GetRungWords, GetCorrectAnswerWords, ExplainDifferently, GetOpeningWords, AskTutor, AskGrownUp, ShowSolution, ChooseNext, BeginAttempt, FindTasks, BeginPaperAttempts, ReportProblem, RequestChildConsent, SendConsentForm, RestateAge and the requests of the PIN, SetPin, VerifyPin, ChangePin and ResetPin.
-
appmakes a key for each action and sends it with every repeat of the action. -
The same key with another method, another attempt, another profile or another request gets
CAUSE_KEY_ALREADY_USED, and a repeat while the first request goes,CAUSE_STILL_GOING, the codeaborted: no failure of the service, so that a repeat waiting for a long first one is no server error to a count of 5xx.appknows it by its cause, whatever its code, and repeats it until the limit of its method. -
A repeat once it is done is answered by what is recorded, with no AI:
Method A repeat gets SubmitWorkthe verdicts and the reading recorded, and the same next; of the Check that solved a task from paper,solvedalone, since its close erased its submissions with their verdictsSubmitEssayhow the submission ended, repeated, without the text read and the words of the feedback: they are nowhere on the serverGetRungWords,ExplainDifferentlythe words the attempt keeps, while it is open; the words of a rung repeatedand without marks, which the server does not keepGetCorrectAnswerWordsan answer repeatedwithout words: the server keeps none, and a response lost is words lostGetOpeningWordsthe model's words the attempt keeps, repeated, while it is open; a fallback text, the same answerAskTutoran answer repeatedwithout words: the server keeps neither the question nor the answerAskGrownUpan answer repeatedalone, with no words and no act: the server keeps nothing of the request or the answerShowSolutionno longer used: apianswersunimplementedChooseNextthe same choice BeginAttemptthe same attempt and the open view of its task FindTasksan answer repeatedwithout frames: the server keeps noneBeginPaperAttemptsthe same attempts ReportProblemthe same report RequestChildConsentthe same consent, at the limit of consents too SendConsentFormthe same consent, with the form it sent RestateAgethe same profile SetPin,VerifyPin,ChangePin,ResetPinthe same answer: a wrong PIN is not counted again, and a PIN changed or set already is not read as wrong -
DoneandGetHintcarry no key: they repeat by the attempt's state. Nor do the other requests ofAccountService, which repeat by the state of the account, ofModuleService,PackageService,ProgressService,LegalServiceandWorkService, andGetOpenAttempt,OpenLesson,GetLessonRunandCompleteLesson, which repeat by the state of the profile, the attempt or the run: two openings of a lesson at once give the one run, and a second "lesson done" on a run that ended passed gets the same answer. A creation of what is there already getsCAUSE_ALREADY_EXISTS, whichCreateAccountchecks before the code, so that its repeat is not refused for the code it redeemed; a deletion of a profile deleted alreadyCAUSE_NO_PROFILE, and of an account deleted alreadyCAUSE_ACCOUNT_GONE; a change sets the same values again.
The own key and the clock.
own_key, the key and its provider by its code in the admission table, goes with every request of a profile of its owner that calls AI, "explain differently" too.apitakes it with a profile of the age categoryadultalone, and otherwise refusesCAUSE_KEY_NOT_FOR_PROFILE.- It holds the key in the memory of the request alone, and writes it nowhere.
- Neither the limit reached nor the key refused moves the call to platform AI.
own_key_provider, the provider alone, without the key, goes withBeginAttemptof a profile of the owner that checks the task by the own key, so thatapichooses the route to AI for the checks of the beginning and checks no quota; another profile getsCAUSE_KEY_NOT_FOR_PROFILE. Each later request on the attempt that calls AI goes by theown_keyit carries, or on platform AI without one, and meets the quota there as an outcome.- An engine's choice goes by the route of the request whose answer or refusal gives it, so that it gives nothing that
BeginAttemptby the same route would refuse. On a profile of the owner that checks the tasks by the own key, every request that may give a choice names the route:SubmitWorkby the provider of itsown_key, and when it sends nowork, which AI would read, byown_key_provider;BeginAttemptby its own; andChooseNext,OpenLesson,GetLessonRun,CompleteLessonandDone, which call no AI, byown_key_provider. A submission withown_key_providerbesideworkorown_keygetsinvalid_argument. Without a provider, the choice goes by platform AI; another profile that names a provider getsCAUSE_KEY_NOT_FOR_PROFILE. On the own key neither the quota nor the limit of platform AI closes the AI that checks the tasks, and only admission may. clock_offset_minutes, the offset of the device's clock from UTC, goes with a request on platform AI alone, for the family day of its quota, and not with the own key (П-23). A request that calls no AI carries none —BeginAttempt,ChooseNext, the others that may give a choice, andGetQuota: the end of the family day that their refusals, outcomes and shares name is the oneapikeeps with the account.
What never reaches the device. Before the task is solved, an answer holds no key, no solution, nothing of a check, and no trap: neither the trap catalog nor the trap that a wrong value shows, which the tutor's words alone get, in api, as the module format's trap catalog has it. Nor does any answer hold a technique of the task beyond the IDs given on request, its leading question beyond what a hint asked for gives, the simpler case, a leak phrase, the seed of the attempt, or, to the learner, the marks of the criteria of a rubric. The skill map holds no trap, and the description and trap_advice of a trap reach the adult's progress alone, for a trap that repeats in closed attempts; the titles of a task's skills reach it alone too, for a solved attempt. Once the task is solved, SolvedTask comes (below), with what comes next.
The work.
- On a handwriting sheet, the PNG of the one crop, without its
sheet_box,SheetWork. A task of a module is solved on the sheet of a task from paper, and its crop is the strokes drawn without the tracing paper under them. WorkbookWork, the crops of a workbook's filled boxes, is no longer used: no task is solved on a workbook,appsends none, andapianswers itinvalid_argument.- On a task from paper,
PaperWork, the three images of the Check: the task's crop asappcut it, without strokes,statement; the PNG of the crop of the work,crop— the tracing paper at its place with the strokes on it, and the sheet's visible strokes, the tracing paper shown or hidden —, each stroke drawn in its style, in colour; and the crop of the instruction above the task,instruction, asappcut it by the instruction's frame the finding gave, without strokes, a JPEG or a PNG of at most 4 MiB, empty when the finding gave none. An attempt of a task from paper takespaperalone, and one of a task of a module takessheet, but forAskGrownUp, which takespaperon either. - With a sheet, the text of each option the learner tapped on the tracing paper, by its answer slot.
- Nothing of the writing history goes, nor the context of the submission, which
appkeeps on the device to give the canvas its marks, nor the groups of strokes and their frames (Т-31), nor the text of an item. - The server keeps no crop, so the work goes again for the tutor's words.
The verdict. SubmitWork sends the work of a task with a verdict and answers once the reading has ended, with the verdict on the whole observation.
itemsholds each item of the task, in order, with its verdict, and each of its answer slots with its own. The verdicts and their reasons are written as the module format's checks and the observation have them.valueis what was read, which the learner sees, "Read: 6": the value of the observation, or the text of the option tapped.- When a call of AI gives no reading, the answer slots that AI reads get
unchecked, andoutcomesays why; a slot boundchoicekeeps its verdict. wrong_answerscounts the attempt's wrong answers, this one's too: a wrong answer is a submission with an answer slotnot_yet, and anunreadable,uncheckedorso_far_correctone raises no rung.- On a task from paper, a slot may be
so_far_correct, "So far correct": it has no answer yet, and the Check read a solution with no error in it. It is no verdict: it closes nothing, andappdraws no mark for it.tutor_wordsholds the tutor's words of the Check, after every verdict. solvedcomes when every item is correct, and the attempt is closedCLOSE_REASON_CORRECT; beside it,nextsays what comes next (below).
Two requests. The words come in a request of their own, after the verdict: there is no channel of real time (Т-25). A task from paper is the exception: the Check gives the verdict, the tutor's words and the ladder in one call, and the words come in the answer of SubmitWork. After a wrong answer, app asks GetRungWords; after a correct one, GetCorrectAnswerWords: while the tutor's panel is open, or once when the learner opens it, for the last submission of the task on screen that gave "not yet" or "correct"; with the panel closed, app asks neither. An essay is one request, SubmitEssay.
The tutor's words.
-
The words come whole, once they passed the leak check and the form check, or as the fallback text, never in parts.
-
The rung's words. The k-th wrong answer gives the rung k, up to 3; from the fourth on, no rung is new.
GetRungWordsnames the wrong answer it asks for by thewrong_answersof its submission's answer, and sends that submission's work again. A wrong answer that is no longer the last getsCAUSE_NOT_CURRENT, with how many there are, so that the words never speak of a work the learner has written over.- The answer is the rung, its words and the marks they come with.
- When a call of AI came to an outcome, the words are the rung's fallback text and
outcomesays why; when the words failed a check, they are the fallback text with no outcome. - The same wrong answer asked again, or a repeat, gets the words the attempt keeps, with no AI and no marks.
-
After a correct answer,
GetCorrectAnswerWordssends the work again, while the profile has begun no other attempt. The right is one answer with words:apispends it when it gives the words, and only then. An answer without words — a call that gave none, with its outcome, or words that failed a check, with none — leaves it, and a request with a new idempotency key sends the work and calls AI again, bounded by the quota on platform AI and on an own key by the key's limit at its provider. An answer with words that was lost has spent it: its repeat getsrepeatedwithout words (above). On an attempt that no correct answer closed, and once the words were given, it getsCAUSE_NO_MORE_WORDS.appkeeps the work until an answer comes, and with the tutor's panel closed, while the task's screen is open, until the panel opens. -
Explain differently,
ExplainDifferently, is one call of AI on a rung, without the work. It names the wrong answer whose words the learner reads, asGetRungWordsdoes, and one that is no longer the last getsCAUSE_NOT_CURRENT.CAUSE_NO_OTHER_WORDSis its outcome when the words are the ones the learner reads already: the right to it on that rung is spent. -
The opening question,
GetOpeningWords, is "Hint" on a task from paper while the attempt keeps no ladder, before its first Check, which has no techniques and no leading question of an author: it sends the work as it stands,work, to the Check, one call of AI, and gives the first rung of the ladder the Check gives, a question on how to begin the task, or the first of a frame of several. The attempt keeps the Check's answer and its ladder as after a submission, but its verdicts are not shown and count no wrong answer. The model's words the attempt keeps, and every later request gets them,repeated, with no AI; a fallback text, the platform's opening question in the language of the words, it does not keep, so a request with a new idempotency key calls AI again. Once the attempt keeps a ladder it getsCAUSE_NOT_CURRENT, and "Hint" isGetHint's rung. It reserves the quota asSubmitWorkdoes. -
A question to the tutor,
AskTutor, is the learner's own words about a task from paper, typed in the tutor's field or said into it and read before Send:question, at most 500 code points, not empty, with no control character but a line break, elseinvalid_argument, as is a task of a module. It sends the conversation on the task before it,turns, oldest first, asappholds it in the tab's memory — the learner's questions and the tutor's words, at most 8 turns of at most 1000 code points each —, and the work as it stands,work. One call of AI, the words of a task from paper underhint, by their cascade, gets the question and the conversation as data between their tags, never as instructions, with the tasks of the frame as the Check the attempt keeps gave them and the hints given, and no work; the answer is the tutor's, never the answer or a step the learner has not written, no nearer than the current rung, and passes the leak check and the form check of the tutor's words, else it is the opening question's fallback text, with no outcome. A call that gives no words — a failure, the quota, the limit of platform AI, no admission — is no refusal: the answer holds the fallback text and names the outcome. While the attempt keeps no Check, the Check readsworkfirst, asGetOpeningWordshas it, and the attempt keeps it with no verdict shown and no wrong answer counted; it reserves the quota asSubmitWorkdoes. The server keeps neither the question, the conversation nor the answer — not in the log, not in the record of the idempotency key —, so a repeat getsrepeatedwith no words; a question is no rung, moves no rung and counts no wrong answer. What an adult says into the field is the browser's recognition, on the device: the contract carries its text alone, never audio. -
Grown-up mode,
AskGrownUp, is a grown-up's request on a task from paper or of a module, behind the grown-ups' PIN thatappasks: an action of an adult, with the rightcan_manage. It sends the request,question, asAskTutor's, the conversation before it,turns, asAskTutor's, the work as it stands,work,paperalone — on a task of a module itsstatementthe pictureappdrew of the module's text —, and the strokes the crop of the work shows,strokes, in the order of the sheet, at most 3000: each aSheetStroke, its ID on the sheet and its points across and down in pixels ofPaperWork.crop, in pairs, whichappthinned to at most 128, with no time and no pressure — the one request whose strokes reach AI as points —, and the free sheet beyond the crop as the element measured it, each aFreeBandin its pixels, absent when none:free_below, across the crop's width, from below the lowest stroke or task's crop there, or from the crop's bottom edge when that is lower, down to the sheet's edge or at most 5000 on, 1 at least;free_right, across its height, the same to the right. One call of AI,drawingof the admission table, by its own cascade, gets them as data between their tags, never as instructions, and has none of the tutor's limits: it may give the whole solution, and its words pass no leak check and no form check. The answer is whole: the tutor's words,words, the strokes to write,strokes, each aTutorStrokeof at least two points in the crop's pixels, in the crop or in the free sheet the request named beyond it, with its colour#rrggbband its width, and the IDs to take off,erase, each one the request named;apiholds the act to that, and a model whose act breaks it does not do. A call that gives no act — a failure, the quota, the limit of platform AI, no admission — is no refusal: the answer holds no words and no act, and names the outcome. It reserves the quota asAskTutordoes. The server keeps neither the request, the strokes nor the answer — not in the log, not in the record of the idempotency key —, so a repeat getsrepeatedalone. An attempt of a task from paper gives no evidence, nor does an attempt of a task of a module once the mode acted on it, the one thingapikeeps of it, its verdicts still shown: the act moves no progress, and the attempt stays open.appputs the act on the sheet by the element'sdrawTutor, one eventtutorof the history ("The history of writing" below). -
Hint,
GetHint, asks for no AI and sends no work:- before the first wrong answer, and on a task with a rubric, it gives the IDs of the task's techniques, empty when the task names none, which is the answer that there is nothing to hint, and the task's
leading_question, of the instance the attempt got, empty when it has none — a closed field of the module format's task, which only this answer brings to the learner's app. It MUST be empty with the rung's words: after the first wrong answer the question is no more given. The server records it as given only when it is not empty, as a technique on request, and an open attempt holds it inrequested_leading_question; - after it, the current rung and its words.
"What is known and what to find"
appshows from the open view of the task: they are open, and the server records nothing of them. - before the first wrong answer, and on a task with a rubric, it gives the IDs of the task's techniques, empty when the task names none, which is the answer that there is nothing to hint, and the task's
-
A step. No screen leads a task's solving steps:
BeginStepandPackageService.GetSolvingStepsare no longer used,appsends neither, andapino longer holds them and answersunimplemented; the open attempt'sstep_technique_idsis empty. The server records each technique given on request.
The solution shown. No solution is shown on any task: ShowSolution is no longer used, app sends none, and api no longer holds it and answers unimplemented. CAUSE_LADDER_NOT_PASSED, CAUSE_NO_SHOWING and CLOSE_REASON_SOLUTION_SHOWN are no longer given, but for an attempt closed so before.
Marks. A mark of the tutor, Mark, is its kind and its place; the program places it, and it belongs to the words of the answer that brings it, the rung's one question.
- Its kind is
MARK_KIND_FRAME, a frame round the place, orMARK_KIND_WAVY_LINE, a wavy line under it, on a task from paper alone, at a box on its crop, and only while the profile's hint mode is "Show where",HINT_MODE_SHOW_WHERE; with "Questions only" a task from paper gets the words alone, and a task of a module keeps its frame in either mode. - Its place is an answer slot by its place,
answer_slot, or a box on the crop the device sent,crop_box, in whole thousandths, as the observation writes them.- On a workbook, only an answer slot: the box, framed with its strokes, or alone when it is empty.
- The box of the first mistake that the analysis gives goes as it is, with no translation. On a task from paper it is the box of the first mistake the Check gave, a box on the crop of the Check's work, and the wavy line comes only with the model's words, never with a fallback text or a repeat;
appdraws it while the tutor's panel is open, and drops it once the work changes or the tracing paper moves, since the box would no longer be under the place it names. - A group's label as a place comes only if the frames of the groups go with the work, as a field added to
place(Т-31).
- Its name, which a screen reader reads,
appwrites in the language of its screen from its kind, its number and its place: "Tutor's mark 1 of 2". appgives the canvas the marks with the context of the submission it kept, as the types of the element<novatrail-canvas>have them:Marks,MarkandAnchorof@altnovatrail/spec/canvas, written by hand and checked against this message.
An essay. SubmitEssay sends the crop of the sheet of a task with a rubric, and its answer is how the submission ended, end, which is no verdict:
SUBMISSION_END_FEEDBACK: the essay was read and assessed.textis what was read, as it is written, andfeedbackthe words of the feedback; without them, they failed the leak check or the rule of feedback, andappshows its own phrase "no feedback this time", which is no neutral phrase.SUBMISSION_END_UNREADABLE, withreason,blankorillegible, as a verdict's reason is written: it reached no assessment, and the learner writes the sheet again.SUBMISSION_END_UNCHECKED:outcomesays why, and is absent when the assessment assessed no criterion;textis there if the essay was read.closednames why the attempt was closed while the submission went,CLOSE_REASON_UNSPECIFIEDwhen it is open: the feedback comes all the same. A submission on an attempt closed already getsCAUSE_ATTEMPT_CLOSEDbefore any call of AI.- Neither the marks of the criteria nor their justifications reach the device.
- The attempt stays open for writing again, and the learner ends it with
Done, after one submission at least, whatever it came to; earlier,CAUSE_NO_SUBMISSION.Donecloses itCLOSE_REASON_DONE, and the task is solved: its answer isSolvedTaskwithnext.
The task solved. SolvedTask comes once an attempt is closed by a correct answer or by "Done":
keys, each answer slot's key as the module format writes it, of the instance when the task is a template; a predicate or a rubric has none.solution, the task's fieldsolutionas JSON of the module format, bytes, andmodule_format_version, its version; empty when the task has none.appreads it by the types of@altnovatrail/spec, and for a version of the format that its build does not read, it offers to reload.criteria, on a task with a rubric, the text of each criterion, without the marks of the assessment.
The account. GetAccount gives the account of the user signed in: account_id, the ID of the account in api, not the user's ID at the sign-in service; whether the PIN is set; the account's profiles; and the consents for a child that have no profile yet.
appreads it when it starts and after signing in, and erases on the device the databases of the profiles that the list does not hold: a profile deleted on another device. It erases only by an answer that came, and for the account that the registry of the device names; a failure of the network erases nothing.- A user with no account gets
CAUSE_NO_ACCESS, andappasks for an invite code.CreateAccounttakes the code, the owner's statement that they are 18 or older, whichapikeeps with its date (П-6), and the versions ofprivacy-policyandterms-of-usethe owner accepted (below); a code that is not valid, or was redeemed, getsCAUSE_CODE_NOT_ACCEPTED. - The tariff of the account comes with what is decided of tariffs (О-14).
Profiles. Profile is a learner in the account as api keeps it: its pseudonym, avatar, age category, country, presentation style, hint mode, language of the interface, grade and goal for the tutor (below). default_mode and ask_before_showing are no longer used — no screen has a mode, and no solution is shown —: api gives them unset, keeps none, and ignores them in ProfileSettings, and app sends none. owner marks the profile of the account's owner, who is of the category adult; a child's profile is of another category.
- The avatar is the code of a picture of the set of
app: no picture is uploaded. - The presentation style holds the voicing for now: whether it is on and its speed. Only what changes the words goes to AI from it, and neither the voicing nor the hint mode goes there; of the language, only the name of the one the words of a task from paper are written in. The voice is chosen on the device.
- The hint mode is "Show where",
HINT_MODE_SHOW_WHERE, or "Questions only",HINT_MODE_QUESTIONS_ONLY: whether a task from paper gets the wavy line with the rung's words. - The language of the interface is a well-formed tag of BCP 47, which
apikeeps with no list of its own; absent,appspeaks the language of the device. - The grade is from 1 to 12, as a module with grades asks for it.
- The interests of a learner come only once the module format gives a task a look by interests: a field that nothing reads is not kept.
- The date the age was given and the last activity stay in
api.
Settings. ProfileSettings is what an adult sets when a profile is created and changed. A field sent is set; a field left out stays as it is, and on a new profile takes its default, which api gives — whether the voicing is on is such a field of its own, apart from its speed: the hint mode "Show where"; the voicing on at the category under_13 and off at the others, at normal speed. An empty language of the interface or avatar, or a grade 0, clears it. The pseudonym is from 1 to 30 Unicode code points once the spaces at its ends are trimmed, the avatar's code up to 64 ASCII characters, and a country ISO 3166-1 alpha-2; a field of another form gets invalid_argument.
UpdateProfileis an action of an adult, with the rightcan_manage.SetVoicingsets the voicing alone, from the screen of a task: a learning request, with the rightcan_learn, so the learner sets it as well as the adult, and it holds on every device.SetHintModesets the hint mode alone, from the profile's menu, the same way, for a learner of the categoryadult; a child's profile getsCAUSE_ADULT_NEEDED, whose mode an adult sets withUpdateProfileon the profile's page.- The country and the age are given again only by
RestateAge(below).
The owner's profile and a child's. CreateOwnerProfile creates the owner's profile, of the category adult by the owner's statement, with no age asked. A child's profile is created in two steps, since a consent comes before it:
RequestChildConsentsends the child's age in years, from 0 to 17, and country; an age left out getsinvalid_argument.apiworks out the age category, records a consent that waits, with the category and the country alone, and keeps the age nowhere. A country that the deployment does not take getsCAUSE_COUNTRY_NOT_ACCEPTED, here and onCreateOwnerProfile, the requests that name a country (П-2); the child's profile takes the consent's.- Once a parent's consent is confirmed,
CreateChildProfilecreates the profile by its ID, with its pseudonym and settings; while it waits,CAUSE_NO_CONSENT. By a consent that the learner gives themselves it creates the profile at once, and the profile waits for it.
The consent. Who consents for a learner is set by the age category, as the table of the age of digital consent sets the category; ChildConsent and the profile's ProfileConsent say it as giver:
- A parent, for a learner below the age of digital consent of their country. The consent has a code of its request,
request_code: ten characters of Crockford's base32 in two groups of five,ABCDE-FGHJK, unique among the consents that wait, whichappshows beside the formparent-consentand the parent writes on it. The parent signs the form, and the adult sends its scan, a photo or a PDF of up to 10 MiB, bySendConsentForm;apikeeps it apart from its database, in a closed bucket of its own, where the operator checks it against the code and confirms the consent by a command ofapi, or does not accept it: thenformisFORM_STATE_NOT_ACCEPTED, and a new scan takes the place of the one before. A card transaction comes before the public launch (П-28). - The learner, from that age on. The profile is created at once, and the learner gives the consent in it before their first work,
GiveOwnConsent, by the textteen-consent: a learning request, which a profile below that age getsCAUSE_ADULT_NEEDEDfor: its consent is an adult's. A learner who reached the age gives it the same way, and confirms by it the consent a parent gave. - The owner of their own profile, by the statement that they are 18 or older (
CreateAccount). ProfileConsent.needsays what the profile waits for before its next work: nothing, the learner's own consent, a parent's —waiting, with its code —, or the age given again. While it waits, a learning request of the profile getsCAUSE_NO_CONSENT, and while the age is to be given again,CAUSE_AGE_NEEDED— but for the requests on the consent itself, which neither refuses:GiveOwnConsent,WithdrawOwnConsent, the learner'sExportProfile,SetWorkStorageswitching the storage off,DeleteWork, which goes as switching it off goes, the learner'sListWorksandGetWork, by whichappbuilds the export as by the learner'sExportProfile, andReportProblem. Only these two causes are lifted: each request keeps its other refusals, and the learner'sListWorksandGetWorkget noCAUSE_ADULT_NEEDED, which the learner'sExportProfilegets at a profile whose consent an adult gave. Switching the storage on while the profile waits getsCAUSE_NO_CONSENT.- Taking back.
CancelChildConsenttakes back a consent with no profile: one that waits with its scan, so that nothing of it is left, and one confirmed as a withdrawal, which leaves its minimal record and its scan for their term. Either no longer counts toward the limit. - The limit. An account has as many consents that wait, without a profile, as
apilets it have, a numberapiholds;RequestChildConsentbeyond it getsCAUSE_TOO_MANY_CONSENTS, coderesource_exhausted, with no data, checked after the key: a repeat with the same key gets the same consent, at the limit too. - Withdrawal is as easy as giving, by the same interface (GDPR, art. 7(3)), and it is the deletion of the profile with everything of it, which leaves the minimal record of the consent: a parent's consent the adult withdraws by
DeleteProfile, and their own the learner byWithdrawOwnConsent, a learning request at a profile whose consent they gave, which a profile whose consent an adult gave getsCAUSE_ADULT_NEEDEDfor — but for one that waits for the learner's own consent,CONSENT_NEED_OWN: a learner who reached the age of digital consent while a parent's consent stands confirms it byGiveOwnConsentor withdraws it byWithdrawOwnConsent.appoffers the export first.DeleteProfiledeletes a profile whose learner gave their own consent too, since the owner holds the account, andappsays so before.GetAccountshows nothing of a consent taken back or withdrawn. - The age again.
RestateAgegives the age and the country of a profile again, by an action of an adult: once the country of a learner who gave their own consent raised its age of digital consent —needis thenCONSENT_NEED_AGE—; at the yearly refinement, whichage_check_duemarks a year after the age was given, while the category stays as it is until then; and with a new country. The owner's profile gives its country alone.apiworks out the category asRequestChildConsentdoes, and keeps the age nowhere; a new category that needs another consent leaves the profile waiting for it, a parent's with a new code of the request and the version ofparent-consentthe request names.
The storage of works. SetWorkStorage switches the storage of a profile's works on the server on or off. Switching it on is a consent by the text storage-consent, given by whoever consents for the learner: an action of an adult, ACTION_ADULT with the right can_manage, and at a profile whose learner gave their own consent, the learner's, ACTION_LEARNING with the right can_learn. The other kind of action gets CAUSE_LEARNER_DECIDES or CAUSE_ADULT_NEEDED. Switching it off records when, and erases the copies on the server; Profile.work_storage says whether it is on. A learner who confirmed a parent's consent, at whose profile an adult had switched the storage on, is asked by app whether to keep it, on a screen of its own: a yes is the learner's SetWorkStorage switching it on, which is no repeat there but records the learner's own consent, the learner its giver, in place of the adult's; a no switches it off, after app has offered the export.
Stored works. While the storage of a profile's works is on, the server keeps each work of the profile as the device holds it — the handwriting on a task with a key as well as an essay or a drawing —, put, listed, read back and erased one at a time by WorkService. The server keeps the bytes and reads none of them, and gives none to an AI provider: a work is checked by its picture from the device, as before.
StoredWorkis the work of one attempt: its writing history, the JSON of what<novatrail-canvas>gives in its own names, in UTF-8; each submission's context, the same way, with how many events of the history it covers, as the device keeps them by the rules the device and the runner share (above); and its picture, the PNG of the strokes the surface shows at the end, as the device draws it. Its size is the sum of the bytes of the history, the contexts and the picture: at most 4 MiB, 4,194,304 bytes.apisets its kind by the attempt's task, or by the work kept of it before — handwriting on an item checked by a key or a predicate, an essay on a task with a rubric, a drawing otherwise — and when it kept it.PutWorkkeeps the work of an attempt of the profile in place of the one kept of it before: a learning request with the rightcan_learn, the profile's own.appputs the work when it writes it to the device, at each submission and when the attempt closes at least, and the last one put stands. While the storage is off it getsCAUSE_STORAGE_OFF, and a work over the limitCAUSE_WORK_TOO_LARGE; a message larger thanapireads (above, "Refusals and outcomes"),appreads asCAUSE_WORK_TOO_LARGEtoo.apitakes the work's kind from the attempt's task, or from the work kept of it before: a digest of the attempt's package that the index of the image does not know getsCAUSE_PACKAGE_UNKNOWN, whatever work was kept before, whichapprepeats after a growing pause; a version out of the window of formats thatapireads, with no work of the attempt kept before,CAUSE_VERSION_NOT_GIVEN; and a withdrawn version, which the image still holds, gives the kind by its task. On each refusalapikeeps nothing of the work, andappkeeps it on the device alone.apichecks the form alone — the history a JSON array and each context a JSON object, in UTF-8, eachhistory_lengthfrom 0, and the picture a PNG by its signature — and a work of another form gets the codeinvalid_argumentwith noRefusal, so that every stored work goes into the export.ListWorksnames the works kept, newest first, with their kind, when each was kept and its size, without their bytes, andGetWorkgives one whole,CAUSE_NOT_FOUNDwhen there is none: a learning request withcan_learn, to go on with a work on another device or to export it, or an action of an adult withcan_manage. While the storage is off the list is empty.DeleteWorkerases one stored work, by whoever decides the storage, asSetWorkStorage, and goes while the profile waits for a consent or for its age, as switching the storage off goes: the other kind of action getsCAUSE_LEARNER_DECIDESorCAUSE_ADULT_NEEDED. Its answer is "erased", for an attempt of the profile with no work kept too; the work on the device stays. Switching the storage off erases them all at once, and deleting the profile or the account erases them with everything else.- The export of a profile carries its stored works beside
api.zip, not in it, so that no answer is larger than a work: the profile's file ofapi.zipnames them,worksof its file, asListWorksnames them, andappreads each byGetWork, one at a time, and writes it into the file of the export, the history and the contexts as the JSON values their bytes hold, not as protobuf's JSON mapping writes bytes, and the picture in base64, as the files of the format of the export hold them.
The versions of the texts. A request that gives a consent names the version of its text that the person saw, LegalTextRef, as GetLegalTexts gave it, and the record of the consent keeps it: CreateAccount those of privacy-policy and terms-of-use, RequestChildConsent and RestateAge that of parent-consent, GiveOwnConsent that of teen-consent, and SetWorkStorage that of storage-consent. A text with no current version is named by no request. RequestChildConsent and RestateAge name parent-consent whenever it has a current version, whoever the category makes give the consent, since only api works the category out, and api records it with a parent's consent alone. A version that is not the current one — a next version before its day among them —, or a text with a current version left out, gets CAUSE_TEXT_NOT_CURRENT: app reads GetLegalTexts again and shows the current version before the person consents once more.
A problem reported. AttemptService.ReportProblem reports a problem with the tutor's words of an attempt, open or closed, from the screen of the task, a learning request with the right can_learn; who sees it, app decides (П-26). It names the answer that brought the words, reply, and beside a rung its number; the words as app showed them, since api keeps none of the words of a correct answer, of the feedback of an essay and of an answer to a question; a word of the closed set, kind — wrong, unclear, not for the age, harmful, personal, other —; and the person's text, up to 1000 code points. The answer is the report's ID and when the operator reviews it by, 3 days after it came. api keeps the report until it is reviewed and for a year after, and the deletion of the profile or the account leaves it to its term without the IDs of the account, the profile and the attempt: the operator may have passed it on. Its words and text stay as they were written, so app asks the person to write no name in it. The operator reads it by a command of api and follows the platform's path of escalation for reports.
The PIN. The PIN of the section for adults is from 4 to 6 digits. It is a barrier of the interface, not of the server: when to ask for it app decides, and no request carries proof that it was asked.
- Each request of the PIN carries an idempotency key, so that a repeat after a lost answer counts no wrong PIN that was not (above).
SetPinsets it while the account has none, and otherwise getsCAUSE_PIN_ALREADY_SET.VerifyPinandChangePinon an account with none getCAUSE_NO_PIN.VerifyPinanswersPinCheck. A wrong PIN counts toward closing the input, and the answer says how many wrong PINs are left before it closes, and when it opens, once this one closed it; while it is closed,CAUSE_PIN_LOCKEDsays when it opens.appwords it in the language of its screen, what went wrong and what to do, and keeps no counter of its own, which would part from the server's (WCAG 2.2, 3.3.1 and 3.3.3).ChangePinchanges it by the PIN before it, which counts toward closing the input asVerifyPincounts it.ResetPinchanges a forgotten PIN by a fresh sign-in, and opens the input if it was closed.
Checking the own key. CheckOwnKey checks a key of the owner's at its provider when it is connected, on the page where the key is entered, by a request with nothing of a learner's: an action of an adult on the owner's profile of the category adult, which another profile's request gets CAUSE_KEY_NOT_FOR_PROFILE for. The answer is the key accepted, not valid, with no right to the models, or the provider closed to it at the profile, with no call; a provider that gave no answer is the outcome CAUSE_AI_FAILURE. An account has as many checks in a sliding window as api lets it have, a number and a window api holds, and every check counts, a provider closed among them, but a request refused before it — by the profile, the form of the key or the category, which api checks first —: beyond them CheckOwnKey gets CAUSE_KEY_CHECKS_EXHAUSTED, code resource_exhausted, with no call and with when the next check opens, next_key_check, which app tells the owner. ListOwnKeyProviders names the providers whose own key tutor admits at the profile's category for one kind of call of AI that api makes at least — the reading of a work, the words sent with the work, and "explain differently", sent without it —, by the admission table and the models admitted at the deployment's rung, each by its code and name in the table, so that app builds no list in and offers no provider that the check finds closed; at a profile whose category is not adult, none (Т-20).
The quota. AccountService.GetQuota gives the share of the family day's quota of platform AI that a profile has spent, never a sum in dollars and no cap:
- A learning action,
ACTION_LEARNINGwith the rightcan_learn, gets the share of its own profile alone, whichappshows where the learner begins their work; an action of an adult,ACTION_ADULTwith the rightcan_view, gets the share of the account beside it, in the section for adults. A child never sees what the family spends. - A share,
QuotaShare, is what the spending of the family day takes of a cap, the profile's or the account's, as its calls were settled, without the reserves of calls still going, so that within a day it only grows: in whole percent from 0 to 100, rounded down, so that 100 is the cap reached; spending past the cap is 100 too. An account whose tariff has no caps has platform AI closed and gets no share. cap_reachedsays that the settled spending of the profile or of the account has reached its cap, so that no request of the profile on platform AI goes until the next family day: a learner whose share is below 100 may have it closed by the account's cap. Beside a learning action it tells what a refusalCAUSE_QUOTAof a beginning tells with no call of AI — that the quota is closed to the profile —, and no share of the account goes with it. Below the caps, a request may still meet the quota when its reserve does not fit beside the reserves of calls still going, and a new task by handwriting when what is left holds no typical task.next_family_dayis when the next family day begins, by the dayapikeeps with the account: the request calls no AI and carries no clock offset (П-23).- The limit of platform AI, which closes it to everyone until the operator opens it again, is no share:
appmeets it asCAUSE_PLATFORM_LIMIT. The own key spends no quota. The tariff comes with what is decided of tariffs (О-14). - The request carries no idempotency key: it repeats by the state of the quota.
Deletion and export.
DeleteProfileandDeleteAccountneed a fresh sign-in, not the PIN. Their answer is "deleted": of a profile,apperases its database, and of the account, everything of the account on the device, and signs out without refreshing the token. The owner's profile is deleted the same way, and the last profile leaves the account without profiles.- Other devices learn of a deleted profile by the list of profiles, and of a deleted account by
CAUSE_ACCOUNT_GONEwhile their token lives, about an hour, and later byCAUSE_NO_ACCESSonce the sign-in service has signed them out and a new sign-in is a new user. ExportProfileis an action of an adult, and at a profile whose learner gave their own consent the learner's learning request too,ACTION_LEARNING; a profile whose consent an adult gave getsCAUSE_ADULT_NEEDEDfor it.ExportProfileandExportAccountgive the part of the export thatapiholds, with no fresh sign-in:api.zipof the format of the export and its version, the integer of itsVERSIONin decimal, whichappputs into the file of the export as they are, beside the manifest, what the device holds and the stored works, as the files of the format of the export name them. The own key is no part of it.- The IDs of an account's profiles, and of the attempts of a profile, that
apigives MUST NOT be one once the capital lettersA–Zare read as small: they name files and folders of the export, and a reader refuses an export with two such IDs (the ruleexport.caseof reading the format of the export). UUIDs written in one case meet it. - A part whose
export_format_versionis not the version its build ofappwrites goes into no file:appoffers to reload, as it does onunimplemented. A new version of the export reachesapibeforeapp, so the build that meets it is the older one, and the reloaded build writes that version.
The legal texts. LegalService.GetLegalTexts gives the legal texts that app shows as its own pages and with its consents: the current version of every text whose place is app, texts — its version in force with the highest number whose day has come, on the day of the request in UTC, by the versions and the passport of the legal texts —, in the order of their IDs by code units. A text with no such version is absent, and while none applies the list is empty.
- The next version.
next_textsgives, in the same order, the next version of every text whose place isappthat has one: the version that becomes current on the nearest day still to come, its version in force with the highest number among those of that day.appshows it before it applies, beside the current one, as the version that applies from its day, so that a person reads a change before it concerns them and can withdraw a consent first (sources 3.11). A consent names the current version, never the next one: a request that names the next version before its day getsCAUSE_TEXT_NOT_CURRENT(below). LegalTextis the text's ID; the number of its version;in_force_since, the day from which the version applies,YYYY-MM-DD, from 00:00 UTC, a date with no time of day, which aTimestampwould not write;body, the Markdown of the version, in English, as the legal texts write it, with no HTML, no image and no link;summary, the gist of the version, plain text;summary_language, the tag of the language the gist is in, as the passport writes it; andtranslationandtranslation_language, the version's translation into the language asked and its tag, empty when the version has none.appnames the language of its screen in the request,interface_language, a field of its message, not the headerAccept-Language. The texts are in English, and the English text is the one in force: on a screen in another languageappsays so in it, and shows the gist beside the text, and a version's translation into that language, when it has one, with no force of its own.apigives the gist in the language asked when the passport has it, found as the lookup of RFC 4647 finds it — the tag, then the tag cut by its last subtag, with no regard to case, so thatru-RUfindsru— and else in English; an empty tag asks for English. The translation is found the same way, and when the version has none in the language found, it is empty, with no English in its place: the body is the English. A tag that is not a well-formed one of BCP 47 getsinvalid_argumentwith noRefusal, and the method has no refusal of its own.- The method has the idempotency level
NO_SIDE_EFFECTS, andappcalls it by Connect GET with no token and no ID of a profile, as it calls the open views ofPackageService: the policy is read before signing in. The request holds the language alone, in the address, and sets no header,Connect-Timeout-Msneither, so that it is simple and goes with no preflight; on its own originapianswers it with CORS (above). - An HTTP cache may keep the answer, but not for ever, as it keeps an open view, which its digest fixes: the same request gets another answer once a new version comes into force, which a new image of
apibrings, or, in a self-hosted copy, its operator's folder, whichapireads when it starts, and once the day of a next version comes, at 00:00 UTC.apigives the answer a lifetime inCache-Controlof an hour at most, and no longer than until the next 00:00 UTC on which a next version it gives applies. A stale answer misleads no one: each text comes with its version, a version replaced stays readable for ever, and a screen that showed it showed a version of record. - The platform's
apiserves the legal part ofspec,legal/, which it takes from the Go modulespecat the tag it pins, asspec.Legal. A self-hosted copy'sapiserves the folder of its own operator, of the same layout, from the path its configuration names, and refuses to start when the folder breaks the rules of reading the part that the legal texts set. The contract is the same for both. - Which version of a text a consent was given to, the request that gives it names, and the record of the consent keeps (above, "The versions of the texts").
Open views by digest. PackageService gives the open views of the manifest, the skill graph, the technique catalog and the example tasks of a package by its digest: of the package of an attempt or of a lesson run, and of the current version of a module in the catalog or connected, as long as the image of api gives it.
- An open view is
OpenView: its bytes, JSON of the module format, and beside themmodule_format_version, MAJOR.MINOR.appandapiread it by the types of the module format, and for a version its build does not readappoffers to reload. The open views of a lesson and of a task come the same way, with the token, in the answers ofLearningService. - Its methods of open views have the idempotency level
NO_SIDE_EFFECTS, andappcalls them by Connect GET, with no token and no ID of a profile: the request holds the digest alone, in the address. It sets no header,Connect-Timeout-Msneither, so that the request is simple, goes with no preflight, and an HTTP cache may keep its answer. - The tiers of the skills,
skill_tiers, come with the open view of the skill graph: they are no field of the graph, and the skill map draws them (the module format, on the skill graph). - The area of each skill,
skill_areas, comes with it too, as the canonical view of the package holds it: the skill's ownarea, or else the fallback area of its module's subject, which the open view of the graph does not fill in. The cognitive map groups the skills by it (below, "The cognitive map"). - The counts of tasks and lessons come with the open view of the manifest,
task_count,skill_task_countsandlesson_count, whichapicounts in the package, the same for every viewer: every task once, a template too, for each skill the tasks of which it is a primary skill of an item — the item's own, or the task's for an item that names none —, and every lesson once, whatever age categories it suits. The page of the module shows them, of a module not connected too, whichListLessonsgives no lessons of. - The example tasks,
GetExamples, are those the manifest names inexamples, in its order: each by the open view of its task, the same as an attempt of it gets, with its band, its difficulty and the primary skills of its items, which the module format opens for an example alone. An example is no attempt:apirecords nothing of it, gives no seed, answers no work on it, and the request names no profile, so the page shows every viewer the same examples, andapptakes the pictures of their statements as the files of the device part. A manifest that names no examples gets an answer with none. - A part the module does not have — a skill graph, a technique catalog, examples — is an answer without its view.
- A version the image no longer gives, withdrawn or out of the window of formats that
apireads, getsCAUSE_VERSION_NOT_GIVEN; a digest that the index of the image does not know, while a deployment goes on,CAUSE_PACKAGE_UNKNOWN, whichapprepeats after a growing pause.
Files of a device part. The files of a package's device part — LICENSE, NOTICE and the media files (the module format, on packages) — are no method of the contract. app takes each by HTTP GET at the address of api that it reads from /deployment.json, followed by /packages/sha256-<hex>/device/<path>:
sha256-<hex>is the package digest with-in the place of:, as the archive of a package in a release ofmodulesis named;<path>is the file's path in the device part of a package as files:LICENSE,NOTICE, ormedia/and the file's path frommedia/, each segment percent-encoded as RFC 3986 encodes a segment of a path.
The request carries no token and no header, so that fetch goes with no preflight and through the HTTP cache, and app gives a media file to the canvas as a Blob. On its own origin api answers each with CORS (above). The answers:
| Answer | When |
|---|---|
200 |
the file |
404 |
the device part of the package has no such path |
410 |
the image no longer gives the version: withdrawn, or out of the window. app asks CheckPackages |
503 with Retry-After |
the index of the image does not know the digest: a deployment is going on, and app repeats after the time it names |
Withdrawal. The device learns of a withdrawal from api, not from the module index. CheckPackages names digests, by the account of the token and with no ID of a profile, and api keeps none of them. The answer gives each PACKAGE_STATUS_GIVEN; PACKAGE_STATUS_NOT_GIVEN, withdrawn or out of the window; or PACKAGE_STATUS_UNKNOWN, while a deployment goes on.
appasks it when it starts, about the digests whose open views it keeps, and afterCAUSE_VERSION_NOT_GIVEN, an answer410, a lesson run endedRUN_END_REASON_UNCHECKEDor an attempt closedCLOSE_REASON_UNCHECKED.- Of a digest no longer given it erases the open views, in its cache and in the databases of the profiles, and the state of the lessons on it; about a digest not known it asks later.
- It is an answer of its own, apart from a failure: a refusal to give an open view tells no withdrawal by itself. The refusals stay all the same, so that a withdrawal shows in the middle of the work too.
Modules. A module comes to a learner by ModuleService, from the learner's session, with the right can_learn:
- The current version of a module is the newest by semver that the pinned index of
apidoes not mark withdrawn and whose module format is in the window ofapi, one for every learner. A version suits a learner by its audience: the learner's age category is one of itsage_categories. The explanation language chooses nothing: the card of a module names it when it is not the language of the screen, and the adult chooses. ListCataloggives the modules of the pinned index whose current version suits the profile, connected ones too, each with the digest of the current version.ConnectModuleandDisconnectModuleconnect and disconnect a module, with no version: what the learner begins outside an open lesson run goes on the module's current version. A module disconnected keeps its evidence, loses its task skill, and its open lesson run endsRUN_END_REASON_NOT_SUITABLEat its next request.SetTaskSkillsets a connected module's task skill: the skill the learner chose for its tasks, on the tile of its tasks or on the skill map, whichChooseNextwith the module gives its tasks on until the learner gives the choice back to the tutor with an empty skill. The learner chooses among the skills the map opens, andappoffers no other;apiholds only that the skill is one of the graph of the current version, elseCAUSE_NOT_FOUND, and a module solved on the sheet getsinvalid_argument.ConnectedModule.task_skillgives it back, empty while the tutor chooses or once the current version no longer has the skill.ListConnectedModulesgives each connected module with the digest of its current version, by whichapptakes its manifest and skill graph before the first attempt: the title and the explanation language of the module, and the tiers by whichappreads a sequential module. For a module on the sheet,sheet_solvedhas one entry for each task its page holds for the learner now, in the page's order, by the same rule asBeginPaperAttemptswith its ID: whether an attempt of the task closed correct, on any version; so Home names the number of its tasks and shows which are solved before the page is begun. It is empty for every other module and for one with no current version.- A module is on the sheet,
ConnectedModule.on_sheet, when its current version is a fixed set,selection: fixedof its manifest (the module format, on the manifest): its tasks are one page, and the engine chooses none of them. ListCoursesgives the courses of the pinned index (the module format, on courses), each by its current version — its newest whose format version is in the window ofapi; a course has no withdrawal — with its title, description, subject, explanation language, whether it is evolving, and those of its grades whose moduleListCataloggives the profile, from the lowest grade; a course left with no grade is not given. A course only joins its modules: Home shows a course's connected modules as one card, one grade at a time, and Subjects shows its grades as rows of one card, each connected byConnectModulewith its module's ID. Which grade Home shows is the device's to keep, notapi's.- A module with no current version for the learner — none at all, or one whose audience the learner is not in — comes with no digest. It has no attempts and no lessons, and may be disconnected.
appnames it by the title of a manifest it keeps of an earlier version, or else by its ID.
The goal for the tutor. Profile.goal is what the tutor leads to first across the modules: up to three items in order of importance, each an area — a code of the closed list of the module format, by its spelling — or a skill, by its full ID. It changes only which reachable skill and module the engine's choice across the modules takes, by the turns of its items, which the rule of engine sets: in two of every three such choices the goal's skill takes the place of a new skill, the author's order and the queue, and the third is the modules' turn, as with no goal; the lesson of an open run, the corridor, consolidation, repetition and probes stay as they are, and while the module of the goal's skill still places the learner — its trial series and its first skills —, the goal's turn is that module's own, with its codes and no item. With none, the tutor leads the modules evenly. A choice of a module's tasks reads no goal, and api gives it none: the task skill stays a choice inside one module.
AccountService.SetGoalsets the whole goal, and a goal with no items removes it: an action of an adult with the rightcan_manage, at every profile of the account, as the adult's correction of the level (below) — the owner's, so an adult learner sets their own, a child's, and that of a learner who gave their own consent. The learner sees the goal, a child too, and in a profile not of the categoryadultappasks for the PIN of the section for adults before the goal sheet and before "★ Make it the goal", a barrier of the interface (above, "The PIN"). The answer is the profile; no method of its own gives the goal back, whichGetAccountgives with the profile.- Three items at most, none twice, each an area or a skill, else
invalid_argument.apiholds each item new to the goal: an area of the list, or a skill of the graph of the current version of a module connected to the profile, not solved on the sheet — elseinvalid_argument,CAUSE_NOT_FOUNDorCAUSE_NO_CURRENT_VERSION, as the method's comment names them.appoffers no other: which skills a goal may take — not mastered, with tasks for the learner, with a verdict — is the interface's, as the task skill's is the map's. A profile whose consent is not confirmed, or whose age is to be given again, getsCAUSE_NO_CONSENTorCAUSE_AGE_NEEDED, as a learning request: the goal is processing of the learner's data. - An item stays as it was set. One whose skill the current version of its module retired leads to the skills that replaced it, by the graph's
retired_skills, as the learner's progress is carried to them. One whose skill's module is disconnected, has no current version for the learner or is solved on the sheet, or whose area a later version of the format leaves out, leads to no skill until it is back, and the engine takes the goal's other items.SetGoaltakes an item the goal holds already as it is, so that the adult may reorder or remove it.appshows an item that leads to no skill as such, and names its skill by a graph it keeps of an earlier version, or else by its full ID. Why it leads to none the contract does not carry:appreads it off the map — a skill mastered, an area whose every skill with a verdict is mastered, an item whose skills left have no tasks for the learner, else nothing within reach —, and names none in the rare case where the engine finds no skill and the map finds one, a skill behind skills that give no verdict or have no tasks. apiappends each goal set to the evidence log, a fact forlearner-modelbeside the attempts and the adult's corrections of a level: its items in order, none when it was removed, and when. The model reads it not: it gives no evidence of a skill and moves no level. It is a kind of evidence of its own, which a version oflearner-modelbefore that kind refuses:apisets a goal only with a version that gives the kind, and each reader of the log inapileaves out a record its version refuses. By it a repeat of an engine's choice over the log knows the goal the choice was made by, and the history of the cognitive map when each item was set. A request that names the goal the profile has, the same items in the same order, appends nothing and answers as the profile is, so the method repeats by the state of the profile, with no idempotency key. The fact goes into the export and is deleted with the evidence log; the goal in force is kept with the profile and deleted with it.LearningService.PreviewGoalis "The tutor will start with", on Next of the cognitive map and in the goal sheet: the first five skills toward the goal, each once, with its module and the number of the item it leads to, by the turns of the goal's items from the first — for the goal the profile has, or for a draft of the sheet not saved. The engine computes it by its rule of the goal, from the learner model and the skill graphs of the modules connected at the time of the request; consolidation, repetition, probes and a module's placement come in their own time and are not in it, nor is a skill mastered or out of reach, nor one with no tasks, asGetSkillMapcounts it (below, "The skill map"), whose pool by the profile's categoryapigives the engine. It writes nothing — no choice is made, the open attempt stays open, nothing goes to the evidence log — and judges no route to AI and no quota, so Start, which isChooseNextwithout a module, may give another skill. It gives skills, not tasks: which task follows depends on how the attempts before it end. A learning action, Next, needs the rightcan_learn, and an action of an adult, the goal sheet,can_view; either may name a draft, and either at a profile whose consent is not confirmed, or whose age is to be given again, getsCAUSE_NO_CONSENTorCAUSE_AGE_NEEDED. A draft of more than three items, with an item twice, or with an item of neither an area nor a skill getsinvalid_argument; an item of it is read as an item of a saved goal, and one that leads to no skill gives none.
The engine's choice. The engine chooses what comes next, a lesson or a task outside a lesson, and api calls it:
- when the learner asks for it:
ChooseNext. Withmodule_id— Solve on the tile of a module's tasks — the choice is a task of that module alone, on its task skill when it has one, and never a lesson:apigives the engine that one module with no lessons and the task skill as the skill chosen. A task skill on which the module's pool holds no task gives nothing, with no outcome; a module not connected getsCAUSE_NOT_FOUND, and one with no current version for the learnerCAUSE_NO_CURRENT_VERSION. Without it — Next on the cognitive map — the choice is among all the modules connected, a lesson or a task, by the goal for the tutor as it is then (above), or on the skillskillnames when it names one, which reads no goal;appsends no skill, and a module and a skill both named getinvalid_argument. It closes the open attemptCLOSE_REASON_LEFT, andappwarns beforehand that the attempt cannot be gone back to.apikeeps the module and the skill with the choice, for its repeat.nextafter a task of a module's choice stays in that module, on the module's task skill as it is when the next choice is made; after a choice that named a skill alone, on that skill; after one that named neither, among all the modules, by the goal as it is when the next choice is made; - when an attempt outside a lesson is closed by a correct answer or by "Done": in the answer that closes it,
next(below); - when a lesson run ends by a request: in its answer,
RunEnd, or in the data ofCAUSE_RUN_ENDED, and again on a repeat of the "lesson done" that ended it. It is a choice of the lesson's module, of its tasks alone, asChooseNextwith the module gives:appoffers it as Solve beside the module's next lesson. When the module is no longer connected or has no current version for the learner, it gives nothing, with no outcome. A run that had ended before the request, by a job of the operator or by another request, gives no choice, andappasksChooseNextwith the module while it is connected.
EngineChoice names the choice by its ID and gives a lesson, CHOICE_KIND_LESSON, which OpenLesson opens, or a task, CHOICE_KIND_TASK, which BeginAttempt begins: a choice begins nothing by itself. When the AI that checks the tasks is closed to the learner on the route of the request (above, "The own key and the clock") and no task that a tap checks is left, it gives nothing, CHOICE_KIND_NOTHING, with the outcome that says why — CAUSE_QUOTA with when the next family day begins, CAUSE_PLATFORM_LIMIT or CAUSE_NOT_ADMITTED, and on the own key CAUSE_NOT_ADMITTED alone —, and with none when there is nothing to give for another reason. A choice toward the goal for the tutor names the item it leads to, goal_item, as the goal held it then, and every other choice none: api keeps it with the choice, and it goes into the export with the choice's reason code. app shows the learner, a child too, which item of the goal the task is for, by its number in the goal as the profile has it, and the item alone once the goal holds it no more.
The reason code. The engine gives each choice of a lesson or a task a reason code, ReasonCode: why it gave it, while ChoiceKind says what. The list is closed, and a code carries no parameter: what was given — the task, the lesson, the version — is in the record beside it.
REASON_CODE_CONSOLIDATION: after a wrong answer, another task on the same skill, while the skill is within reach;REASON_CODE_NEW_SKILL: a skill not given before, whose prerequisites the engine's rule counts as met, or which has none;REASON_CODE_QUEUE: of the skills within reach that were given before and are not mastered, the one not given for longest in its module;REASON_CODE_REPETITION: the review date of a mastered skill has come;REASON_CODE_PROBE: a skill put aside comes back as a check;REASON_CODE_SKILL_CHOSEN: the learner chose the skill — the task skill of the module, on the tile of its tasks or on the skill map, or a skillChooseNextnames —, and the engine the lesson or the task on it;REASON_CODE_AUTHOR_ORDER: a skill with a rubric or without assessment comes next in the author's order, by the skill graph, without the learner model;REASON_CODE_OPEN_RUN: the lesson of a run that is open, which the learner goes on with;REASON_CODE_ROTATION: a skill given before comes round again, the one not given for longest first, though it does not fit the queue ofREASON_CODE_QUEUE: it is mastered, or no skill is within reach;REASON_CODE_LESSON_CHOSEN: the learner chose the lesson on the lessons of its module, andOpenLessonopened it; no branch of the engine's rule made it;REASON_CODE_TO_GOAL: a choice across the modules on a reachable skill that an item of the goal for the tutor leads to, by the turns of the goal's items (above): in the goal's turn, two choices of three, in place of a new skill, the author's order and the queue; the lesson of an open run, consolidation, repetition and probes keep their codes, and so does a module's turn while it places the learner.
A choice has one code: that of the branch of the engine's rule that made it, a lesson's as a task's, or REASON_CODE_LESSON_CHOSEN for a lesson the learner chose. A choice for a skill the learner chose is REASON_CODE_SKILL_CHOSEN, and a choice of a lesson whose run is open REASON_CODE_OPEN_RUN, whatever else would fit them. A choice of nothing has no code, and neither has an attempt that the learner began again.
apikeeps the code with the choice, and it goes into the export. The adult sees it in the progress,AttemptRecord: an attempt outside a lesson with the code of the choice of its task, and an attempt of a lesson run with the code of the choice that began the run, so thatREASON_CODE_OPEN_RUNis never in the progress. No answer to a learning request carries it,EngineChoiceincluded: a child is not told it, and no one on the learner's screen reads it.REASON_CODE_TO_GOALalone the learner sees too, a child as well, by the item thatEngineChoice.goal_itemnames: the learner sees the goal, and the item tells no more than it.appwords each code for the adult, in the languages of its interface, and a code its build does not know with words that name no reason.apisends no text of a code.- A code kept with a choice is never rewritten, and a value never changes its meaning, as the versions of the contracts have it (above). A branch of the engine's rule that the list does not name comes as a new value, as a row «в реестр spec» of the RUN.md of
engine; the value of a branch the engine drops stays, and its comment says that it is no longer given. Consolidation within a lesson, which the rule ofenginedoes not bring in its first slice, would come the same way, and an early end of a run, which it does not bring either, as a new reason of its end.
Beginning an attempt. BeginAttempt begins an attempt in one of three ways:
- by an engine's choice of a task, on the current version of its module;
- on a task segment of an open lesson run, named by the run's ID and the segment's place, on the run's package. Every task segment before it has ended, and it has not, or else
CAUSE_SEGMENT_UNAVAILABLE; - again: the same task as an earlier attempt, outside a lesson, on the current version. A task the current version does not have gets
CAUSE_NO_CURRENT_VERSION.
A profile has one open attempt of a task of a module: a new one closes the one before CLOSE_REASON_LEFT, and leaves as they are the open attempts of tasks from paper (below). A choice begins one attempt: once it has, another request by it gets CAUSE_ALREADY_EXISTS, and app reads the open attempt of the profile, GetAccount; a choice of a lesson gets invalid_argument, as a choice of a task does in OpenLesson.
apigives a task only to a learner in one of its age categories, and otherwise refusesCAUSE_NOT_SUITABLE. A task that platform AI checks it begins only while the quota holds enough for a typical task, and otherwise refusesCAUSE_QUOTA,CAUSE_PLATFORM_LIMITorCAUSE_NOT_ADMITTED; a lesson run stays open on them.- The answer,
AttemptStart, is the ID of the attempt, the open view of its task — of an instance when the task is a template, which the seed of the attempt chooses (the module format, on packages) — and the package digest, by whichapptakes the manifest and the technique catalog, and an attempt of a lesson run names its segment; it names the primary skills of the task's items too, as an example does, by whichappgoes on with a module's open attempt only for the skill chosen, and starts a task of that skill otherwise. The seed never goes to the device.
The open attempt. While an attempt is open, the learner goes on with it on any device, with a clean sheet: the strokes stay on the device that wrote them, but for a profile whose storage of works is on, where app may take the work another device put back from GetWork and give the canvas its history and contexts again ("Stored works" above). GetOpenAttempt gives the attempt as the server keeps it: its beginning; the verdicts and the reading of its last submission with a verdict; its wrong answers; the current rung with its words, and whether "explain differently" was asked for on it; the techniques given on request, and the leading question given on request; and on a task with a rubric, how each submission ended and when. The list of profiles names each profile's open attempt, open_attempt, so that a device that keeps no state of it finds it. An attempt closed meanwhile gets CAUSE_ATTEMPT_CLOSED with its close reason: on a version no longer given CLOSE_REASON_UNCHECKED, and after 7 days without an action CLOSE_REASON_ABANDONED.
A task from paper. A task from the learner's own page, open to every profile, goes by PaperService and then AttemptService.
- The finding gives a frame to each task as the page sets it, and each sum or equation that says by itself what to do, as each of a column under one instruction, is a task of its own, its frame without the instruction; examples that the instruction alone explains, as numbers under "Round to the nearest ten", stay one task with it, and so do the parts of one task that share its statement or its picture, as a), b) and c) of one word problem.
- Each call of AI of a task from paper asks up to three models of one provider in turn — Haiku 5.5, Sonnet 5.5, Opus 5.5; the drawing of grown-up mode, Haiku 5.5 and Sonnet 5.5 alone —, the next only when the one before did not do: the finding when it found no task, the statement when it failed, the Check when a slot's confidence is
low, a slot isunreadableor the answer is off its schema. An unsure "Not yet" of the last model is shown, and the tutor's words say it more softly. The outcome is the last model's that answered, and its usage every attempt's. SoFindTasks,SubmitWork,GetOpeningWordsandAskTutor, whose Check reads the work as it stands, run up to 90 s atapi, andappnames that deadline inConnect-Timeout-Msfor them and waits as long for oneCAUSE_STILL_GOING;AskGrownUpruns up to 300 s, the drawing's own budget,appnaming that deadline; every other request runs 30 s. FindTaskssends the photo of the page in one request: a JPEG or a PNG of at most 4 MiB, without the metadata of its file, whichappscales down to fit. One call of AI, the capabilitytask_findingof the admission table, its attempts as above, gives the task frames alone, each a box in whole thousandths of the photo, in the order of the page, and above each the frame of its instruction,instruction, when the page prints one; no text of the page comes back. Each attempt without a request first asks its model which way up the page is, and the program turns the photo upright before the model finds the tasks on it, by any angle;turn_degreesgives the turn, clockwise, and the frames are on the photo so turned:appturns its photo the same way — about its centre onto the smallest upright rectangle that holds it, rounded to whole pixels, its corners white —, at any scale, and goes on with it, so that a request sends the photo turned and its attempts ask no turn. It makes no call without the reserve of the quota: there the quota, the limit of platform AI and no admission are refusals. A call that gives no frames is an outcome, and the learner frames the tasks by hand. The server keeps neither the photo nor the frames.- The learner's request. The learner may ask the tutor in words, on the page to pick from, which tasks to take and how to split them, as "only the first column, each example a task of its own".
FindTasksthen sends the photo again with the request,request— at most 200 code points, with no control character, not spaces alone —, the frames the AI found that are on the page now,found, at most 20, and those the learner drew,drawn, at most 40; frames without a request, or any of these out of bounds, getinvalid_argument. The call is the same capability, its attempts as above, and gets the request as data between its tags, never as an instruction, with the frames numbered as the page shows them. Its answer is frames alone: the program keeps those inside the photo, at most 20, and drops each that covers a frame the learner drew, its overlap at least 0.8 of their union.appputs them in place of the frames the AI found before and keeps the learner's own, and offers Undo, the frames before, until the learner changes anything; an answer of no frames leaves the page as it was. Neither the request nor the frames are kept: not in the log, not in the record of the idempotency key. appcuts each picked task's crop on the device, by a frame the AI found or one the learner drew, and the crop of its instruction, by the instruction's frame the AI found, andBeginPaperAttemptsbegins one attempt for each, from 1 to 20, its IDs in the order of the tasks, on the pagepage_idnames — the IDappgives the page, which names its file of the export, 1 to 200 letters, digits,-,_and., the first not a., elseinvalid_argument. It closes the open attempts of tasks from paper that the profile has on another page,CLOSE_REASON_LEFT, and none of the same page, which "Add" begins more tasks on;apikeeps the page's ID on each attempt while it is open; the open attempt of a task of a module stays, and beginning one closes no attempt of paper. So a profile has, beside its one open attempt of a module, the open attempts of one page, each closed by a correct answer, by a new page or after 7 days without an action. It meets the quota and the route to AI asBeginAttemptdoes. Withmodule_id, a module the profile has connected whoseConnectedModule.on_sheetis true,tasksis 0 and the page is the module's:apibegins an attempt of a task from paper for each task of the module's current version that suits the learner and is no template, by the order of their IDs, at most 20, and the answer gives the open view of each,tasks, in the order of the attempts, and the package's digest;appdraws each statement's text as the picture the tracing paper shows andPaperWork.statementsends. A module not on the sheet, ortasksbeside it, isinvalid_argument; one not connectedCAUSE_NOT_FOUND, and one with no current version for the learner, or no task that suits,CAUSE_NO_CURRENT_VERSION. A later attempt of one of its tasks names the page alone, as a task from paper's does, and the attempt it begins anew,renews:apikeeps on each attempt of a module's task, and after it closes, the module and the task — neither the photo, nor a crop, nor the work —, and the new attempt takes the task of the one it renews; an attempt of a page from paper keeps none.renewsbeside a module ortasksother than 1, or an ID that is no attempt of the profile from paper, isinvalid_argument.- A task's crop may hold several tasks, each with an answer of its own, as a frame drawn round a column of sums: the Check gives them, from 1 to 20, in the order of the page — top to bottom, and left to right in a row —, and the parts of one task under one statement, as a), b) and c) of one word problem, are one (see the Check of a task from paper, below). An attempt of a task from paper has an item for each task of its crop, the task at the place n the item n, each with one answer slot, at the place n, 1. Its work is
PaperWork("The work" above), which every request that carries a work sends whole. - Recognise.
ReadStatementmakes the reading of the statement of the attempt's crop,statement_reading, on the learner's press, by the route of the attempt and its attempts as above, and gives the statement of each task as the page prints it — "□" for each box an answer goes in, a fraction with a bar\frac{…}{…}, nested as printed, and a raised power^{…}, LaTeX's way and no more of it, without the task's label, as1), or the sign that parts it from the next, as;—, never a formula. It makes no call without the reserve of the quota.apikeeps the reading,Readingofnovatrail.paper.v1, on the attempt while it is open, and erases it with the Check's answer once it ends; an attempt that keeps a reading answers from it,repeated, with no AI. The Check takes none of it: the model reads the crop itself. A call that gives no reading is an outcome, and the next press asks again.appshows the statements in place of the photo until the learner goes back to it; the device keeps none of them. - The Check. Each
SubmitWorkof the attempt is one Check, the capabilitytask_checking, its attempts as above: the model gets the three images ofPaperWork, their sizes, the language of the words, the learner's age category and the attempt's history, whichapigathers — the verdicts of the Checks before, the rungs shown and the tutor's words before —, and judges the work (see the Check of a task from paper, below). The strokes go only as drawn in the crop of the work, with no stroke's points and no writing history.apiturns each slot's verdict into the verdict of the attempt's answer slot, at the box of what was read,crop_box, by whichappmarks each answer right or not, and puts the tutor's words intutor_words. A Check in which the model read nothing of a solution in any slot gets the outcomeCAUSE_NO_KEY, "Couldn't check this one", and the hints are still given; the next submission checks again.appsends no empty sheet. A call of AI that gives no Check — a failure, the quota, a limit, no admission — is an outcome as any, the slotsunchecked, and the next submission tries again. - The Check's progress. While its
SubmitWorkwaits,appasksGetCheckProgressof the attempt every 2 s, from 2 s after it sent the work:goingwhile aSubmitWorkof the attempt is going, and once the Check went on to a later model,model— which one reads the work now, from 0 — andmodels, how many it may ask. It names no model, calls no AI and changes nothing: the card of the reading says by it that the work went on to the next model. An account with the right of the debug mode reads the models' names fromGetDebug; the others see the models as dots. apikeeps the Check's answer,Checkofnovatrail.paper.v1, on the attempt while it is open — the model's hidden solution and answer, the ladder, the boxes of the errors, the verdicts, the count of wrong answers and the words of the hints —, and erases it once the attempt ends; none of it reaches the device but the verdicts, what was read with its box, the tutor's words, a rung's words and the box of the first mistake as the wavy line. Each Check gives the attempt a new ladder in place of the one before.- Each submission reserves the quota for its Check, the expected price of its three attempts, as any request reserves its calls, and is settled attempt by attempt.
- The attempt is solved when every task is
correct, and a submission with any tasknot_yetis one wrong answer;so_far_correctcounts none. A solved attempt closesCLOSE_REASON_CORRECTwith an emptysolved, no key and no solution, and nonext: no engine chooses after a task from paper, and its attempts give no evidence. - The tutor's words of a task from paper are the Check's and those of "explain differently", in the language of the screens
appshows the learner, which each request that gives words names,words_language—SubmitWork,GetOpeningWords,GetHint,GetRungWords,ExplainDifferently,AskTutorandAskGrownUp—, so that the words and the voice that says them are in the language the learner reads; a request that names none, from an older build, gets the language of the profile's interface, else English. The leak check looks in the tutor's words and in each rung of the ladder for the hidden answer of each task not yet answered correctly, a number the statement prints or the learner wrote being no leak: words that name it are left out, and a rung gives way to its rung's fallback text, the platform's template of the rung in that language.GetRungWordsandGetHintgive a rung of the ladder the attempt keeps, the rung k after the k-th wrong answer, with no call of AI; with "Show where", the rung's words come with the wavy line under the box of the first mistake the Check gave. "Explain differently" is one call of AI on a rung, without the work, as on any attempt, to up to three models in turn. The words after a correct answer are the Check'stutor_words:GetCorrectAnswerWordsgetsCAUSE_NO_MORE_WORDS. A report of a problem goes as on any attempt. "Hint" before the first Check isGetOpeningWords("The tutor's words" above):GetHintgives empty techniques and no leading question, since the task has none.ShowSolutiongetsCAUSE_NO_SHOWING;BeginStep,SubmitEssay,Done,GetOpenAttemptandPutWorkgetinvalid_argument: a task from paper has no steps, no rubric and no open view, its work is never a stored work, and only the device that holds its page goes on with it.Profile.open_attemptnames the attempt of a module alone.
The debug mode. DebugService lets an account with the right of the debug mode choose the models of the calls of a task from paper and see what every call of a model made for the account returned and cost, wherever it was made, on a local run and on the deployment:
- The right is the account's,
api's to keep; on a local run withapi's debug flag every account has it. A method from an account without it answerspermission_deniedwith noRefusal, and on a run with the stub oftutorunimplemented.appasksGetDebugin every build, and shows the debug button, in every profile, only when the answer comes: a refusal of it shows none and is no error to the learner. GetDebuggives the models that can be chosen — those of the adapters oftutorwith a key on this run, with the prices oftutor, their efforts and the efforts at which their thinking may be off —, the models the admission list oftutorgives each call for an adult on platform AI, aDebugAdmittedfor each in the order of their attempts, and the choice now.SetDebugModelssets the choice: the model of every call of a task from paper —task_finding,statement_reading,task_checkingand the words of "explain differently" and of a question to the tutor —, or none, each call its models of the admission list oftutor, in turn. A model chosen is one attempt, with no later ones, and there is no second: the Check is one call of one model, andapiignoressecond. The choice bypasses the admission list.TakeDebugCallsgives the account's actions since the last take — every request of the account that called a model, of a task from paper, of a task of a module or of an essay, with its calls in the order they ended, each attempt of a call apart with its place,attempt, 1 to 3, and each reader of a sheet with its place,reader, 1 or 2: the model as the provider gave it back, its effort and thinking, what it returned as it returned it, the tokens, the time, the retries, the cost and what it came to,failure— and forgets them. ASubmitWorkof a task from paper has one call,DEBUG_CALL_KIND_TASK_CHECKING, and so has aGetOpeningWords; anAskTutorhasDEBUG_CALL_KIND_TUTOR_WORDS, after aDEBUG_CALL_KIND_TASK_CHECKINGwhile the attempt kept no Check; the drawing of anAskGrownUp, of either kind of task, isDEBUG_CALL_KIND_DRAWING; aGetRungWordsof a task from paper makes none. ASubmitWorkof a task of a module has aDEBUG_CALL_KIND_WORK_READINGof each reader; aSubmitEssayaDEBUG_CALL_KIND_WORK_READING, the essay read by its one reader, then aDEBUG_CALL_KIND_ESSAY_ASSESSMENT; itsGetRungWords,ExplainDifferentlyandGetCorrectAnswerWordsaDEBUG_CALL_KIND_TUTOR_WORDSeach. The choice serves none of a module's calls: they keep their models of the admission list.apiholds them and the choice in the memory of its process, for the account of the token, and writes neither to its log nor to its database: the readings of the work and the model's hidden solutions and answers are in them.- Each call is charged to the quota as any call is, by its cost: the sum
appshows is the sum of the costs it took. - A Check in the log exports as a
DebugCase:appputs in it thePaperWorkit sent and the action it took, and the developer the truth — for each task, the value read and its verdict, and the verdict of the whole —, whichappfills in first from what the Check gave, beside what the Check answered for each task's slot,check_verdictandcheck_read. Its JSON, a file a case, is a case of the set of a task from paper oftutor-eval, which reads a folder of them. The file holds the pictures of the work of the profile it was made in:tutor's eval keeps only the developer's own paper. The answer that closes an attempt by a correct answer,SubmitWork, or by "Done",Done, holdsnextbeside the solved task, and its repeat the same: - in a lesson run, the place of the next segment, or
segments_endedwhen no segment is left after it; - outside a lesson, the engine's choice.
Lessons. A lesson goes by a lesson run: the lesson of one learner on the package it began on, with an ID of its own, one open run for a profile and a lesson on every device. The place in the lesson and the state of its demos are app's, by the key "lesson's full ID, package digest", and api does not know them.
ListLessonsgives a connected module's lessons, for the tile of its lesson and its page of lessons: those of the current version that suit the learner whole, in the author's order — by the skill graph, a lesson after those whose skills its own need, then by tier and by ID, as the engine orders them —, each with its full ID, its title, how many segments it has, the place of its group, its state, its tier — the least of the tiers of its skills, asskill_tiersnumbers them, by which the cells of the lessons stand in the tiers of the skill map — and, beside an open run, the places of its task segments that have ended. The lessons of one group have no order between them by the graph, and the page shows a group of more than one "in any order". A lesson is new, open — a run of it is open — or passed — a run of it endedRUN_END_REASON_PASSED, on any version, and none is open. The lesson of an open run that the current version does not list, or that no longer suits the learner, comes after them, each in a group of its own, by the run's package, since a run goes on on the package it began on, and so does its tier.tile_lessonnames the lesson the tile shows, one of the list: the lesson of an open run, the one begun last when there are several; else the first in the order not passed; else the first. It is a look: it writes nothing, ends no run and makes no choice, so the tile and the page cost the learner nothing.OpenLessonopens a lesson: of an engine's choice by its ID, or the one the learner chose on the page of lessons by its full ID,lesson, one and only one of the two. It gives the open run of the lesson when the profile has one, or else a new run on the package of the current version. A lesson the learner chose opens with a choice of its own thatapirecords,REASON_CODE_LESSON_CHOSEN, which the run names: so every run has a choice, as the summary of issues and the adult's progress need. Its record holds what a choice of the engine's would at that moment — the versions ofengineandlearner-modelthatapiruns, the digests and which are the engine's modules, the release ofmodules, the last evidence, whether the pool was limited and the age category —, and a replay does not run the engine for it: no branch of the rule made it, as its code says. A lesson by its ID with no open run that the current version does not have getsCAUSE_NO_CURRENT_VERSION, as a new run of it would. A choice opens one run: once that run has ended, the choice getsCAUSE_RUN_ENDED; a new run takes a new choice, or the lesson by its ID again, and a lesson passed opens a new run.GetLessonRungives an open run again by its ID, after a restart and on another device. The list of profiles names each profile's open runs,open_lesson_runs, with the lesson's full ID and the package digest.- Both answer
LessonRun: the ID of the run; the open view of the lesson, whole, without its skills and age categories (the module format, on lessons); the package digest; the places of the task segments that have ended; and the open attempt of a segment, if there is one.appopens the lesson at the later of that attempt and the place it keeps. - Before each of these answers, and before an attempt of a segment,
apichecks the run whole: the module is connected and has a current version for the learner, and the lesson and each of its tasks suit the age category of the profile — by the package of the current version for a new run, and by the run's own for an open one. An open run that fails endsRUN_END_REASON_NOT_SUITABLE, and one whose package the image no longer givesRUN_END_REASON_UNCHECKED: the request getsCAUSE_RUN_ENDED, andappasksCheckPackages. A new run that fails is refusedCAUSE_NOT_SUITABLE, orCAUSE_NO_CURRENT_VERSIONwhen the current version has no such lesson. - A task segment begins by
BeginAttempt, and ends when its attempt is closedCLOSE_REASON_CORRECTorCLOSE_REASON_SOLUTION_SHOWN, or on a task with a rubricCLOSE_REASON_DONE. An attempt left or abandoned does not end it: the learner begins it again. - "Lesson done",
CompleteLesson, is the usual end of a lesson.appsends it when the learner presses "Continue" on the last segment, and repeats it untilapianswers.apiends the runRUN_END_REASON_PASSEDonce every task segment has ended, and earlier refusesCAUSE_SEGMENTS_NOT_ENDED, with the places of those that have; a second "lesson done" is no error. apiends a run by itself too:RUN_END_REASON_UNCHECKEDwhen the run's package is no longer given or an attempt of it is closedCLOSE_REASON_UNCHECKED,RUN_END_REASON_NOT_SUITABLE, andRUN_END_REASON_ABANDONEDafter 30 days without a request on the run or its attempts. A request on an ended run getsCAUSE_RUN_ENDEDwith how it ended. "Early" would come as a new reason, should the rule ofenginebring it: its first slice does not.appdrops the state of another run kept under the same key, and erases the state of a lesson at every end of its run, in an answer or in a refusal.
The skill map. GetSkillMap gives the state of the skills of a connected module's current version, as learner-model reads it at the time of the request, by a learning action with the right can_learn or by an action of an adult with can_view:
- each skill whose assessability is
verdict: how many pieces of evidence it has and when it was last practised; once practised, its estimate and uncertainty on the scale of the module's bands and its retention; once mastered, its mastery band, its cautious probability with retention, and its review date, or that the review is due already; and whether its tasks are passed,tasks_passed, whichapicounts from its records of attempts: each task of its pool — the tasks of the module's current version where the skill is primary that the deployment can give the profile's age category —, a template being one task, has had an attempt, and at more than half of them the first attempt gave each item where the skill is primary the first verdict "correct"; or whether it has no tasks,no_tasks: its pool is empty, andtasks_passedis false. A prerequisite counts for "ready to start" when it is mastered, its tasks are passed or it has no tasks, by the same countapigives the engine, and a skill with no tasks, mastered or not, is offered for no module's tasks; - each anchor skill that the graph names: whether the learner holds it, why not or why unknown, the full IDs of the skills that teach it, and, whatever the holding, the modules of the catalog not connected to the profile that teach it — those of the pinned index whose current version suits the profile by its audience and names it in
teaches(the module format, on the module index) —, whichappoffers beside an anchor skill whose holding is unknown; - the module's level: the band it stands in, as
learner-modelreads it on the scale of the module's bands — the highest band above it, and none while it stands below the lowest band, where a learner whose grade is in the lowest band starts; and when an adult last set it, which every learner sees, a learner who gave their own consent too.
The graph and its tiers app takes by the digest of the answer, so a skill that the current version no longer names, or names nowhere yet, is not on the map. No trap is on the map: the trap catalog is closed. How the map shows the state is the detailing of skill-map, and what it needs beyond this comes as a field added.
Progress. GetProgress gives an adult, with the right can_view, the progress of a profile, a page at a time, by page_token and next_page_token:
- its attempts, newest first: the task's full ID; the version of its module; the lesson's full ID when the attempt is one of a lesson run's segments, and the lesson's title; the close reason and the wrong answers, from which how the attempt came out follows; when it began and was closed, and when the engine chose the task or its lesson, with the reason code of that choice. On a task with a rubric, each submission with how it ended, and beside a feedback the mark of each criterion, met, not met or not assessed, in the order of the rubric;
- of a solved attempt, one closed
CLOSE_REASON_CORRECT,CLOSE_REASON_SOLUTION_SHOWNorCLOSE_REASON_DONE, the titles of the skills that its task trains: the primary skills of its items, each item's own or else the task's, each once, in the order of the items and of their lists. Any other attempt has none: the skills of a task are closed, since their titles could tell how to solve it, an attempt open or not solved may be begun again, and on the owner's profile the adult and the learner are one person (the module format, on the task). The titles, of the lesson and of the skills, are in the module's explanation language, from the package of the version the attempt went on, as thedescriptionof a trap is; whenapino longer reads that package they are empty, andappnames the lesson by its ID; - the traps that repeat, on the first page alone, the one asked for with an empty
page_token. A trap repeats when the program found it in two closed attempts of the profile or more, counted by its full ID (the module format, on a module); an attempt on a version withdrawnwrong_keycounts none. Each comes with itsdescriptionandtrap_advice, from the trap catalog of the version of the last attempt that found it, with the number of such attempts and when the last was closed. These are the only texts of a trap that reach a device, and only an adult's view of closed attempts (the module format, on the trap catalog); - the adult's last correction of the level of each module of the profile that has one, connected or not since, while the evidence log keeps it, on the first page alone: the module, the band set, and when.
The cognitive map. GetCognitiveMap gives the cognitive map: the skill map of every module connected to the profile at once, which app groups by areas. A learning action needs the right can_learn — the learner on their own screen, a child too —, and an action of an adult can_view; so do the history and the indicators (below). A learning action at a profile whose consent is not confirmed, or whose age is to be given again, gets CAUSE_NO_CONSENT or CAUSE_AGE_NEEDED; an adult's action views the profile whatever its consent, as on the skill map. Each of the three requests names the device's time zone, time_zone, by its name in the IANA time zone database: by it a day begins at midnight and a week at midnight on Monday. api reads it for the request alone and writes it nowhere; one it does not know, or none, gets invalid_argument.
- Each module comes with the digest of its current version and the state of its skills,
SkillState, asGetSkillMapgives it at the time of the request (above, "The skill map"); the graph, its tiers and the area of each skill,skill_areas,apptakes by the digest,GetSkillGraph, as it does for the skill map. - It leaves out a module with no current version for the learner, which
appnames byListConnectedModules, and a module on the sheet: its tasks are judged as tasks from paper, give no evidence and are chosen by no engine, so its skills never move, and no goal takes them. A skill with a rubric or without assessment has no state, as on the skill map, andappdraws it by the graph. A profile with no module to show gets none, andappshows the empty map. window_startnames the skills of the map that were mastered at the start of the window of the indicators (below), by whichappcounts "+N this month" of the whole map and of each area: the skills mastered now, less those mastered then. That is the change of the indicator of the skills mastered, so the title, the areas and the portrait give one number. While the profile was created inside the window it is absent, and the map shows no change over a month.
The history of the map. GetMapHistory gives the tab Progress: the state of the skills of the map at the end of each of the last twelve weeks, Monday to Sunday by the time zone of the request, the current week last and as at the request.
- A past week's state is
learner-modelreplayed over the records of the evidence log before the end of the week, midnight on the Monday after it, in the order of the log, leaving out a record its version refuses, asapi's fold of the log leaves it out: each field ofSkillStateasGetSkillMapwould have given it at that moment with the learner's grade now, which sets only the start of a module with no evidence, the retention and whether the review is due among them, andtasks_passedby the attempts before then on the pool of the current version. The current week's is the map of the request, every record of the log in it. - It is read through the modules' current versions: every piece of evidence goes to the skill of the module's current graph, and of a skill that the current version retired to the skills that replaced it, by the graph's
retired_skills, as the learner's progress is carried to them. So a past week shows today's graphs as the learner stood then, not the map that week showed: a skill a later version added has the evidence on it alone, a module connected later none before, and a new current version of a module changes the past weeks too. - Its modules are those of the map, in the same order and with the same digests; a module disconnected is in no week, though the evidence log keeps its evidence. No week before the one the profile was created in is given: a profile in its first week has the current week alone, and
appshows that there is no history yet. goal_itemsgives each item of the goal for the tutor with since when it has stood in the goal: the moment of the goal set, a fact of the evidence log (above, "The goal for the tutor"), from which it has stood there without a break; a goal set that only reorders the items keeps it, and an item removed and set again takes the moment it was set again. By itappmarks the week each item was set and counts what the goal did since.apikeeps the replay as a cache, never as a record of its own: it rebuilds it from the evidence log and the current versions, deletes it with the profile, and puts it into no export.
The indicators. GetIndicators gives the tab Portrait its indicators, which the learner sees, a child too: api computes them when read, from the evidence log and its records of attempts, and stores nothing new for them.
- The window is the 28 days that end with the day of the request, that day included, and while the profile is younger, the days from the one it was created on,
window_days.currentcounts over the window;previousover the 28 days before it, for the change over the month, and is absent while the profile was created inside the window; andweeksover each week of the history, the weeksGetMapHistorygives, for the sparklines. - The skills mastered: the skills of the map mastered at the end of the period — of the window and of the current week the request —, by the replay of the history. The skills due for review: those of them whose review date has come, or whose review is due already; and of those due at the request, when the one practised longest ago was last practised.
- Right at the first try and needed a hint: of the attempts begun in the period and closed whose evidence the learner model reads, those where a rung of the hint ladder was given — a wrong answer, the k-th giving the rung k —, or a technique or the leading question on request, and of the others those closed by a correct answer with no wrong answer, so that no attempt is in both;
appshows each as a share of those attempts. An attempt of a task with a rubric gives no evidence and is in neither, nor is one left unfinished — left, abandoned or not suitable — with no wrong answer, one grown-up mode acted on, one closed "unchecked", which has no outcome of the learner's to count, or one on a package withdrawn for a wrong key, whose evidence the model leaves out. - The days and the minutes of practice: the days on which an attempt of a task of a module began, of a task with a rubric and one grown-up mode acted on too, and the practice time of each such attempt — from its beginning to its last action, 30 minutes at most, so that a pause counts no more —, summed and rounded down to whole minutes. Nothing outside a task is counted: the worked examples and demos of a lesson are no attempt, and
apidoes not know them. - Every count of attempts takes those of any module, connected or not since, and none of a task from paper or of a module on the sheet: they give no evidence, and
apikeeps no time of them once they end.
The adult's correction of the level. SetModuleLevel is "Easier" or "Harder" at a module's level in the section for adults, an action of an adult with the right can_manage, at every profile of the account: the owner's, a child's and that of a learner who gave their own consent, whom the adult of the account corrects as well. It names the profile, a connected module and the band to set the level in:
- the band next to the band of the level that
GetSkillMapgives, the one before it, easier, or the one after it, harder, in the order of the bands of the manifest of the module's current version, and the lowest band while the level stands below it. No band comes before the lowest, so at the lowest band there is no "Easier" to offer, and at the highest no "Harder"; a band keeps its place and its ID in every version (the module format, on versions of a module), so the current manifest names the band of the level. Any other band is refusedCAUSE_BAND_NOT_NEXT: the level has moved sinceappread the map, by evidence or by another adult's correction, andappreads the map again before it offers a band once more. A module not connected getsCAUSE_NOT_FOUND, one with no current versionCAUSE_NO_CURRENT_VERSION, and a profile whose consent is not confirmed, or whose age is to be given again,CAUSE_NO_CONSENTorCAUSE_AGE_NEEDED, as a learning request: the fact is processing of the learner's data. apiappends the correction to the evidence log, a fact forlearner-modelbeside the attempts: the module, the band set, and when. It gives no evidence of a skill, and the model sets the module's level in that band in one step. The answer gives the band of the level and when the adult set it.- It names the band, not a step, so that it repeats by the state of the profile, with no idempotency key: a request that names the band of the level already appends nothing and answers as the level is. A repeat after an answer lost sets the band the adult chose, and changes nothing once the level stands in it; should evidence have moved the level meanwhile, the repeat is judged against where it stands, as a new request is.
- The fact goes into the export and is deleted with the evidence log.
16. The Check of a task from paper
- A task from the learner's paper has no key: no formula, no solver and no key of a program judge it. A model judges the work, in one call of AI, the Check,
task_checkingof the admission table, at eachSubmitWork, and before the first Check atGetOpeningWords(above, "A task from paper"). The verdict is the model's, shown with no mark that a model gave it.check.protoof the packagenovatrail.paper.v1is the Check's answer, whichtutorgives andapikeeps on the attempt while it is open. tutorholds the answer to its form and checks the words for a leak;apiturns it into the verdicts of the attempt's answer slots and the tutor's words and marks. The images and the history are data, never instructions to the model.
What the model gets. Image 1, the task's crop as printed, with no strokes, PaperWork.statement; Image 2, the work, PaperWork.crop, each stroke drawn in its style, in colour; Image 3, the crop of the instruction above the frame, PaperWork.instruction, when the finding gave one; the sizes of the three; the language of the words; the learner's age category; and the attempt's history, which api gathers: the verdicts of the Checks before, the rungs shown and the tutor's words before. No stroke's points and no writing history go.
What it gives back. Check:
slots, oneSlotCheckfor each task of the frame,taskfrom 1 to 20 in the order of the page — top to bottom, and left to right in a row —, the task n the item n of the attempt, with one answer slot at the place n, 1:verdict,correct,incorrect,unreadable, orno_answerwhen the work holds no answer of the task yet;confidence,low,mediumorhigh;read, what the model read of the task's work, as written — its answer, or, with no answer yet, the solution so far —, andread_box, its box in whole thousandths of Image 2, absent when nothing was read;assumptions, what the model took for given that the statement does not say, as "each number from 1 to 9 once";errors, eachCheckErrora box on Image 2,box, the place in words,where, its kind,kind, and what is wrong there,note, the first mistake first;solutionandanswer, the model's own, hidden:apikeeps them on the server alone and never sends them to the device, since they name the answer.
tutor_words, the tutor's words on the work; andhints, a ladder of 2 or 3 rungs, from a question to a pointer at the place of the mistake. The place of a mistake and the hints come with the verdict, with no second call.
The program's part. The verdict itself is the model's. The program holds the answer to its form — 1 to 20 slots, each task once and in order, a verdict and a confidence of their values, a box inside 0 to 1000, 2 or 3 rungs —, and an answer off it is an answer the cascade goes on from. It checks the tutor's words and each rung for the hidden answer of each task not yet answered correctly, a number the statement prints or the learner wrote being no leak: words that name it are left out, and a rung gives way to its rung's fallback text. Each slot's verdict becomes the verdict of the attempt's answer slot, AnswerSlotVerdict, with value the slot's read and crop_box its read_box:
SlotCheck |
AnswerSlotVerdict |
|---|---|
correct |
correct |
incorrect |
not_yet, a wrong answer |
unreadable |
unreadable, the reason illegible: the learner is asked to rewrite, as on any task |
no_answer with an error |
not_yet at its first error, a wrong answer, as after an answer |
no_answer with a solution read and no error |
so_far_correct, "So far correct": no verdict, no wrong answer, and nothing closed |
no_answer with nothing read |
unreadable, the reason blank, with no mark on the crop |
- A Check in which the model read nothing of a solution in any slot — each
no_answer, with an emptyreadand no error — gets the outcomeCAUSE_NO_KEY, "Couldn't check this one", and its slotsunchecked. - Unsure. The cascade goes on to the next model at a slot's
confidencelow, a slotunreadableor an answer off its form. An unsure "Not yet" of the last model is shown, and the tutor's words say it more softly. - The marks. A frame of several tasks is "Correct · 4 of 4" when every task is correct, and "Not yet · 3 of 4 correct" otherwise, with a tick or a cross by each answer at its
crop_box; a task with nothing written has no mark. With "Show where", after "Not yet" the wavy line goes under theboxof the slot's first error, with the rung's words.
17. The solver of module-kit
- The messages of the key in
key.protoofnovatrail.paper.v1—Answer,Key,TaskKeyandProvenance— are the key that the solver ofmodule-kit, its packagepaper, computes and judges by: a formula, the solver of it, the rules an answer holds before it is a key, and the verdict by a key. No task from paper is checked by them: its verdict is the Check's (above). They stay formodule-kit's solver and the test vectors it passes.ReadingandReadTaskare what "Recognise" gives, the statements and, when the reading gives one, a formula;apikeeps the reading on the attempt while it is open, and none of it but the statements reaches the device.
The formula. A reading of a statement gives the tasks on a crop, from 1 to 20 in the order of the page, or none: each with its statement as the page prints it, as ReadStatement gives it, at most 200 bytes of UTF-8, and as a formula, one line of ASCII of at most 200 bytes, or nothing, when the statement is no formula. Each sum or equation with an answer of its own is a task, though one instruction stands above several; the parts of one task under one statement or picture, as a), b) and c) of one word problem, are one task, and so are the numbers under an instruction that alone says what to do with them.
-
A formula is a statement that is written as an expression or an equation, as
37 + 48 =,3x − 5 = 16and☐ + 5 = 12are. A word problem, one that asks to count in a picture, to compare, to draw or to prove is no formula, and the reader gives none: to put words into a formula is to solve the task, which is AI's solution, not a reading. -
The grammar, in EBNF, with any number of spaces, U+0020, between two tokens and at either end:
formula = expression [ "=" expression ] ; expression = term { ( "+" | "-" ) term } ; term = factor { ( "*" | "/" ) factor } ; factor = "-" factor | power ; power = primary [ "^" exponent ] ; primary = number | unknown | "(" expression ")" ; number = digits [ "." digits ] ; exponent = digits ; digits = digit { digit } ; unknown = "a" | "b" | … | "z" ;^binds tighter than a minus before it, so-2^2is −4;*and/, and+and-, go from left to right. A number has at most 15 digits, and an exponent is from 0 to 10. -
The reader writes every sign of the statement in this grammar:
×and·as*,÷and:as/, the minus sign−as-, a decimal comma as., a fraction with a bar as(3/4)and a mixed number as(2+1/2), and every multiplication with its*, so3xis3*x. A box, a blank or a gap to fill is the unknown,xunless the statement names its letter, and the=at the end, with the empty place after it, goes:37 + 48 =is37+48,☐ + 5 = 12isx+5=12. The words of the instruction, such as "Solve" or "Compute", go too.
The solver. The solver of module-kit computes in rational numbers, exactly, with no floating point, no Starlark and no network.
-
A formula with no
=is an expression, with no unknown: its answer is its value. -
A formula with
=is an equation in one unknown, one letter in it once or more, linear in it: each side isa·x + bonce its operations are done, and its answer is its one root. -
b^0is 1 for everyb, 0 too. A power of what holds the unknown is that itself for the exponent 1, 1 for 0, and not linear from 2 on. -
The answer is a
Number:valuethe integer, or the fraction in lowest termsp/qwith its sign beforep, such as-7/2; nounits; andunknown, the letter of an equation, empty for an expression. -
The solver does not take a formula, and names why:
Reason The formula syntaxis not of the grammar, is longer than 200 bytes, or holds a number of more than 15 digits or an exponent above 10 unknown_in_expressionis an expression with an unknown no_unknownis an equation with no unknown two_unknownsholds two letters or more not_linearmultiplies two parts whose coefficients of the unknown are not 0, divides by such a part, or raises it to 2 or more, as the operations come out: x*x,1/xand(x+1)^2, but not(x-x)*xdivision_by_zerodivides by zero no_rootis an equation that no number solves, as x+1=xevery_rootis an equation that every number solves, as x+1=1+xtoo_largehas, on the way, a numerator or a denominator of more than 100 digits, or an answer longer than 16 characters Of several reasons, the first that applies is named:
syntax, thentwo_unknowns, thenunknown_in_expressionandno_unknown; then those of the operations,not_linear,division_by_zeroandtoo_large, as the operations are done, each part before its operation and the left before the right; thenno_rootandevery_root; and lasttoo_largeof the answer.A formula it does not take is no outcome of a task from paper, which the solver does not check.
An answer. An Answer is a key the program may compare only when it holds these, and none otherwise, as for a task with no one answer of these kinds — a proof, a drawing, a construction, several answers, a text:
- a
Number:valuein the notation ofnumber, at most 16 characters (the module format, on checks);units, the words that may follow it, none empty and no two the same once they went through the steps of units;unknown, one letter fromatoz, or empty; - a
Choice:options, from 2 to 10 labels as the statement prints them without their brackets, each from 1 to 16 characters, and none empty and no two the same once normalized as a choice; andkey, one of them as written.
An answer that breaks any of these is none. With none, the task has no key: its TaskKey has no answer, and its item is unchecked.
The key. Each task's: the solver's answer, with the provenance PROVENANCE_SOLVER, or an answer of AI, with PROVENANCE_AI. The verdict by a key is the same "Correct" or "Not yet" by either.
The verdict. Each task's key gives it its item, the task n the item n, with one answer slot bound anywhere at the place n, 1, and its check:
- a
Number, the check kindnumberwith itsvalueaskeyand itsunits; - a
Choice, the check kindchoicewritten by hand, with itskey, itsoptionsandnotation: options.
The check has no trap values. The readings are joined and judged by the rules of the observation, above, and by the checks of the module format, as on a task of a module, once each value read is brought to the key:
- with a
Numberwhoseunknownis a letter, a value that after steps 1 to 4 of numbers begins with that letter, in either case, an optional space and=, loses the letter and the space, and step 5 drops the=:x = 4andX=4read as 4; - with a
Choice, a value that after NFKC and steps 3 and 4 of numbers is a label in brackets —(C),[C], orC)with a bracket at its end alone — loses its brackets.
Test vectors. The test vectors hold the rules of this section, the solver's of module-kit alone, and none of the Check: contracts/vectors/paper/v1/<case>.json. spec's checks compute each, as a second implementation (just contracts-check), and module-kit's CI passes them all, from contracts.Vectors at the tag it takes (see the generated code, above).
solver.json:descriptionandcases, each with itsdescription,formula, and eitheranswer, theNumberthe solver gives, orrefused, the reason it does not take the formula.answers.json:descriptionandcases, each with itsdescription,answer, anAnswer, andkey, whether it is an answer,true, or none,false.verdicts.json:descriptionandcases, each with itsdescription,key, theAnswerof the key,value, the value read, ornullwhen nothing was, andverdict,{ verdict, reason }as the test vectors of verdicts of the module format write them.- The messages are written as the rules of JSON, above, have it, with the protobuf names. Together the vectors give every reason of the solver, every rule of an answer, and both ways a value is brought to the key.
Documentation
¶
Overview ¶
Package contracts holds the test vectors of the API contracts, which Go code takes at the tag of a release of the module, contracts/vX.Y.Z, as it takes the code of the contracts:
go get github.com/altnovatrail/spec/contracts@vX.Y.Z
The package is there from the first release after v0.7.0. What the vectors hold and how a reader passes them is the text of the contracts, contracts/README.md.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Vectors = sub("vectors")
Vectors is the test vectors of the contracts as the release has them: vectors/ at its tag, with a folder for each package that has them, <part>/vN/, such as observation/v1/boxes.json.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
novatrail
|
|
|
api/v1/apiv1connect
The account and its profiles in the contract between `app` and `api`: the account and the list of its profiles, by which `app` erases on the device what was deleted elsewhere; the profile of the account's owner and a child's profile, which a consent comes before; how a consent is given, confirmed by a parent's signed form, withdrawn and taken back, and the age given again; the PIN of the section for adults; the voicing and the hint mode a learner sets; the goal for the tutor an adult sets; the storage of works; the own key checked when it is connected; the share of the quota of platform AI; deletion and export.
|
The account and its profiles in the contract between `app` and `api`: the account and the list of its profiles, by which `app` erases on the device what was deleted elsewhere; the profile of the account's owner and a child's profile, which a consent comes before; how a consent is given, confirmed by a parent's signed form, withdrawn and taken back, and the age given again; the PIN of the section for adults; the voicing and the hint mode a learner sets; the goal for the tutor an adult sets; the storage of works; the own key checked when it is connected; the share of the quota of platform AI; deletion and export. |