spec


Official standards, schemas, and guidelines for NovaTrail, a universal open platform for adaptive learning, interactive lessons, and AI tutoring.
NovaTrail turns any subject into interactive lessons with an AI tutor, for children and adults alike. A subject comes as a module that anyone can author: a graph of skills, lessons, tasks, typical mistakes, and the kind of canvas the learner works on. The learner writes, draws, types, moves things or speaks. The AI reads the work and talks with the learner, but whether an answer is right is decided by a program against the task's key, never by the model. A learner model brings together the skills of every module, and an engine picks what comes next.
Status
Early design. This repository holds the platform's documents and the module format, in format/: version 0.1, its text, schemas, examples and test vectors, which comes out as files for code from the release v0.3.0, with its types for Go from v0.3.4 and for TypeScript from v0.4.0, and is still to be tried on the modules of the first slice. The first contract between components, the types of the element <novatrail-canvas> between canvas and app, comes out from v0.5.0 (R74), and the other contracts come after it. NovaTrail succeeds MathTrail, olympiad maths for grades 1–6, which is now frozen.
Repositories
All under altnovatrail. Created now, for stages 0–2:
| Repository |
What it is |
| spec |
this repository: the vocabulary, formats, contracts and platform documents |
| .github |
the organization's profile, community files and shared CI workflows |
| modules |
the official modules: olympiad maths, school maths for grade 3 and short essays in English |
| module-kit |
the module format in code — validation, packages, open views, check kinds — and the authors' CLI |
| learner-model |
the learner model: how well each skill is mastered, from the evidence of attempts |
| engine |
picks the next lesson or task |
| sim |
virtual learners that test the learner model and the engine |
| tutor |
the AI side: reading the work, the tutor's words, routes to AI, eval; a library inside api |
| api |
the backend and the platform's only service: accounts, attempts, checks, the learner model, the engine |
| canvas |
the canvases the learner works on, and their layers |
| skill-map |
the learner's skill map |
| app |
the web app for learners and the adults beside them |
| infra |
shared infrastructure: Terraform, domains, deployment, self-hosting |
Later: site (stage 3); module-registry, module-pipeline and widget-template (stage 4).
How the parts fit together is in docs/architecture.md. The order in which the repositories appear, and how to set one up, is in docs/repositories.md; every repository starts from the same template, repo-template/, and follows the same rules, RULES.md.
Releases
A release comes out by itself once the checks pass on main: the next patch of the current line, tagged vX.Y.Z with the release, and nobody tags by hand. The module format has a version of its own, and a change that gives it a new version always starts a new line (R44). Other repositories take its tag as the spec submodule, for the documents and rules, and their code takes the release's files. From the line 0.3 on, a release carries the module format as format-<version>.tar.gz, with its cosign bundle format-<version>.tar.gz.sigstore.json beside it, and Go code takes the same tag as the version of the Go module github.com/altnovatrail/spec, whose package holds the format as spec.Format, with the types of the format in the packages types/formatv0 and types/formatv0/open (R72). From the line 0.4 on, a release carries the same types for TypeScript too, as the npm package @altnovatrail/spec in altnovatrail-spec-<version>.tgz, signed the same way; the package in npm is that file, which the release publishes there itself, by trusted publishing (R37, R73). From the line 0.5 on, the package also holds the types of the element <novatrail-canvas> as @altnovatrail/spec/canvas. They are the contract between canvas and app, written by hand in types/canvas/ (R74). Releases are immutable, so a tag stays on its commit and no file changes once it is out, and GitHub attests each one with its files. A file of a release, spec's or any NovaTrail repository's, is checked by just release-verify, with its bundle beside it, and the packages of @altnovatrail in an npm lock file by just release-verify-npm (R77). They check the file's signature against Sigstore's trust root and everything its certificate names — who signed, at whose call, on which branch and of which commit — and, for a file of spec, the commit or version the file itself holds; that is the check NovaTrail's code and CI rely on. Another repository runs them from its submodule, just -f spec/justfile release-verify …. The attestation, which ties a file to a release rather than to a commit, gh release verify and gh release verify-asset check apart:
just release-verify spec v0.5.6 format-0.1.tar.gz
just release-verify-npm package-lock.json
gh release verify v0.5.6 -R altnovatrail/spec
gh release verify-asset v0.5.6 format-0.1.tar.gz -R altnovatrail/spec
Documents
The documents are in Russian; the module format is in English and normative.
- docs/product.md — what we build and why: who it is for, the principles, the first slice, the roadmap and the open product questions.
- docs/concepts.md — the shared vocabulary: module, skill, lesson, task, canvas, check, tutor, learner model and engine, with a glossary that names each term as code and schemas will.
- docs/privacy.md — privacy and age: kinds of data, age categories, the two routes to AI, and what each AI provider's terms say about minors.
- docs/architecture.md — the platform's big parts and how they connect: the components, one overall diagram, the main flows, and how the interface is put together.
- docs/repositories.md — how the platform is split into repositories: their roles, dependencies, how changes flow between them, the order they appear in, how to set one up, and what is carried over from MathTrail.
- docs/decisions.md — the decision log: what was decided, why, and what was rejected.
- format/ — the module format: what a module may and must contain and how the platform checks it. Its text, the schemas of the manifest, the skill graph, the trap and technique catalogs, the solving steps, the task, with the checks of the task's answer slots, its hints and its templates, and the lesson, the generator of randomness, the shared taxonomy of skills, the layout of a module, the package of a module — its canonical view and its inventory — and the module index, which names every published version of every module, are written, with their examples, the test vectors of the YAML rules, of a whole module, of the manifest, of the skill graph, of the trap catalog, of the task and of the lesson, and the test vectors of the open view, of verdicts, of the leak check, of the generator, of templates, of tiers, of packages and of the module index, and
just format-check checks them; the other parts of a module come as they are written.
- RUN.md — the work plan, in epics: the current epic broken into small tasks, run and reviewed one at a time, and the epics that come later.
- COORDINATION.md — the cross-repository plan, in Russian: in what order the other repositories' tasks run, by repositories 6, and which task waits for which, each row pointing to a task in that repository's RUN.md (R76).
- draft/ — a clickable prototype of the learner's app, and where it differs from the documents.
Contributing
Report a bug or propose a change in an issue, in English or Russian, and open one before a pull request unless the pull request fixes a typo or a broken link. How a change comes in, with every commit signed off, and what every change keeps to are in the organization's CONTRIBUTING.md; the rules every NovaTrail repository shares are in RULES.md. Report a vulnerability privately, as the security policy says, never in a public issue.
Work in the devcontainer: open the repository in VS Code and choose "Reopen in Container". It holds every tool at the version the repository pins. The checks are recipes of the justfile, and just --list names each with its arguments:
just docs-check checks the documents: links, cited sections, the registers and Mermaid diagrams;
just format-check checks the module format in format/: its schemas, examples and test vectors, and computes the verdicts and traps of the vectors of verdicts, what the leak check finds in the vectors of the leak check and in the lessons of a module, the numbers of the vectors of the generator, the instances of the vectors of templates, with the results of their solvers as the vectors give them, the tiers of the vectors of tiers, the package of each module of the vectors of packages — its canonical view, the listing of its device part, its inventory and their digests —, and the module index that each vector of the index builds of its release, or the rule of the index that refuses it;
just types-check checks the types of the module format under types/, in Go and TypeScript. They must be what just types generates from the schemas. Each value of format/ that passes a schema must be read by its Go type and written back as it was, and tsc must take it as a value of its TypeScript type from the npm package. tsc must also take tools/types/canvas.check.ts, the check of the hand-written types of <novatrail-canvas> in types/canvas/, with the DOM;
just go-check checks the Go module code takes from a release: that it requires nothing, and its zip as the Go module proxy will build it;
just ci-lint, just ci-test, just ci-vuln and just ci-licenses check every Go module of spec — the Go module and the modules of tools/ — as the shared Go checks of every NovaTrail repository run them: gofmt and go vet, the tests with the race detector, govulncheck and go-licenses. ci-test writes the coverage of the tests to coverage/go.out;
just licenses-check checks the licenses of the packages of tools/;
just release-version prints the version the next release takes, and just release-files HEAD <folder> <tag> builds the files it carries, the npm package of that tag among them;
just coverage runs every test of tools/ and writes their coverage to coverage/lcov.info, then the tests of the Go modules, as ci-test runs them.
A check prints a line for each problem it finds, file:line: message for the documents and the format, and exits with a non-zero status if it finds any. CI runs them all on every pull request and on main, and a pull request merges only when they pass. Another NovaTrail repository checks its own documents with just -f spec/justfile docs-check-repo. The environment and the checks are described in more detail in the Environment section of CLAUDE.md.
License
Apache-2.0.