spec

package module
v0.9.12 Latest Latest
Warning

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

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

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

README

spec

CI Release CodeQL Latest release Coverage OpenSSF Best Practices OpenSSF Scorecard License

Code Smells Reliability Rating Security Rating Maintainability Rating Vulnerabilities

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/: its text, schemas, examples and test vectors. Version 0.1 came 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; version 0.2, whose digit on a crop is 24 px high unless the module gives it, came out from v0.6.0; and version 0.3, which names the version of go.starlark.net that runs all its Starlark and brings the rules by which the versions of a module compare, comes out from v0.9.0. The format 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); so does the admission table (R96). 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). From the line 0.8 on, a release carries the admission table too, as admission-<version>.tar.gz: Go code takes it as spec.Admission, with its types in the package types/admissionv0, and TypeScript its types as @altnovatrail/spec/admissionv0 (R96). From the line 0.7 on, a release carries the code of the API contracts too, generated from contracts/ (R83). Go code takes it from the Go module github.com/altnovatrail/spec/contracts, at the tag contracts/vX.Y.Z that the release sets on the same commit, with the number of the release, and TypeScript from the npm package @altnovatrail/contracts in altnovatrail-contracts-<version>.tgz, signed the same way, which its README describes; the package in npm is that file too, which the release publishes there itself, as it does the types' package. A repository moves the spec submodule, both Go modules and both npm packages together, at one tag, and leaves them out of Dependabot: a release comes out with each change of a document. 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 spec v0.7.0 altnovatrail-contracts-0.7.0.tgz
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.
  • admission/ — the admission table: to which AI provider, on which route to AI, the work of a learner of each age category may go, and which capability of AI may serve each category, with the facts of a deployment that open a cell. Its text, the table, its schemas, examples and test vectors, and just admission-check checks them (R96).
  • 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 admission-check checks the admission table in admission/: its schemas, the table and the rows of privacy 5.3 and decisions it cites, its examples, and its test vectors, whose answers it computes as the admission function does;
  • just types-check checks the types of the module format and of the admission table under types/, in Go and TypeScript. They must be what just types generates from the schemas. Each value of format/ and admission/ 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 and with the npm package of the contracts' code, whose message Mark the element's marks are held to;
  • just contracts-check checks the API contracts in contracts/: buf's format, lint and comparison with the previous release, the rules of the contracts that buf does not hold, the code buf generates, which just contracts writes, and its npm package, which tsc and Node take, and computes the test vectors of the observation — whether each observation is valid, how two join and which verdicts the joined one gives —, which the module of the contracts carries as contracts.Vectors, and the test vectors of the rules the device and the runner share — how a history of writing folds, the groups of strokes, the crop, snapping and the boxes of a workbook —, which the module carries there too and the npm package by their paths, and holds the examples of the sample file of the eval protocol to their rules — the fields a sample's purpose and writer give it, its strokes, crops and their PNG, its markup, and the numbers of its crops and the groups and boxes of its history by the rules of the strokes — and the examples of the runner's report to its form and to the samples they name;
  • just go-check checks the Go modules code takes from a release — the module at the root and the module of the contracts: what each requires, 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 packages 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, the format and the contracts, 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, and its sample files of the eval protocol with just -f spec/justfile sample-check <file>…, by the code that checks the examples. The environment and the checks are described in more detail in the Environment section of CLAUDE.md.

License

Apache-2.0.

Documentation

Overview

Package spec is what Go code of the NovaTrail platform takes from spec: its normative parts as files, at the tag of a release, which is the version of this module (R64). Code takes them from here rather than from the spec/ submodule its repository keeps for the documents (R21):

go get github.com/altnovatrail/spec@v0.3.0

go.sum and the Go checksum database then hold the files to the bytes of that tag.

Index

Constants

This section is empty.

Variables

View Source
var Admission = sub("admission")

Admission is the admission table as the release has it (R96): admission/ at its tag, with the text, VERSION, the table, its schemas, its examples and its test vectors (admission/README.md, section 3). Its root is admission/, so that the table is "admission-table.json".

View Source
var Format = sub("format")

Format is the module format as the release has it: format/ at its tag, with the text, VERSION, the schemas, the examples and the test vectors (format/README.md, section 3). Its root is format/, so that VERSION is "VERSION" and a schema is "schemas/task.schema.json".

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
contracts module
types
admissionv0
Package admissionv0 holds the types of the admission table, major version 0, generated from the schemas of version 0.1 in admission/schemas by tools/types (R72 and R96 in spec's docs/decisions.md): the table, and the vectors of answers of the admission function.
Package admissionv0 holds the types of the admission table, major version 0, generated from the schemas of version 0.1 in admission/schemas by tools/types (R72 and R96 in spec's docs/decisions.md): the table, and the vectors of answers of the admission function.
formatv0
Package formatv0 holds the types of the module format, major version 0, generated from the schemas of version 0.3 in format/schemas by tools/types (R72 in spec's docs/decisions.md).
Package formatv0 holds the types of the module format, major version 0, generated from the schemas of version 0.3 in format/schemas by tools/types (R72 in spec's docs/decisions.md).
formatv0/open
Package open holds the open view of each part of a module (format/README.md, section 6): the struct of each type the open view of a part reaches, by the name it has in formatv0, with the fields marked x-open alone, of version 0.3.
Package open holds the open view of each part of a module (format/README.md, section 6): the struct of each type the open view of a part reaches, by the name it has in formatv0, with the fields marked x-open alone, of version 0.3.

Jump to

Keyboard shortcuts

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