Canonical format, version 1. Every example below is copied from the
japanese-starter
fixture, which is validated against the published
JSON Schemas
on every build.The envelope
Every file in a course starts with the same two keys, not just the manifest:Versioning and migration
formatVersion is a monotonic integer, raised only for a breaking change.
Studio upgrades in memory on read and only writes the upgraded shape when that file is
next saved, so opening a course never rewrites it.
These changes do not raise the version, and readers must tolerate them:
- a new optional key on an existing file type;
- a new exercise type, composition block type, or part content kind.
Unknown content
A reader that meets acontent.kind, exercise type, or block type it does not know
must keep the file verbatim rather than fail the course. Studio parses such a part as:
Localized text
Any authored string may be a plain string in the course’sdefaultLocale, or a map of
locale tag to string:
text of a literal text fragment.
Taught content is not localized this way: it lives in records, where a language is a field
and list items carry their own locale.
Resolve with an exact tag match first, then the base language (pt-BR to pt), then any
available entry. A writer that edits one locale must preserve the others.
Contributors
A contributor may hold several roles.roles is the list; role repeats the first entry
so readers written against version 1 keep working.
version and releasedOn (as YYYY-MM-DD) also live on project. Both
are authored metadata and have nothing to do with formatVersion, which describes the file
schema.
Collection
A collection defines fields and lists its record files (paths relative to the collection file).Record
One record per file. Amany field stores a list; each list item carries a stable id.
Asset
Each asset lives in its own directory with anasset.json and (when ready) the binary file.
availabilityisreadyorplaceholder. A placeholder hasfile: nulland names the file it expects inexpectedFile.sha256andbyteSizedescribe the file as stored in the project, not the file the author picked. Studio strips EXIF from images on import, which changes the bytes, so the digest is computed after the copy. Use it for integrity checks and as a cache key.- When ready,
filenames the binary in the same directory (for exampleoriginal.svg). Resolve it relative to the asset’s folder. - Never embed binary data or absolute paths. Content references an asset by
idonly.
Lesson and parts
A lesson is an ordered list of parts. Each part points at one file and declares its kind.Composition
A rich-media composition is a list of blocks. Each block has atype, a
binding, and presentation hints. Observed block types are
content-card, media, and callout.
Exercise
The on-disk exercise JSON mirrors the TypeScript interfaces in Exercises: a common envelope (id, type, instruction,
prompt, evaluation) plus a type-specific body. Two examples:
option, token,
pair, and blank IDs) or to accepted-value bindings, never to displayed text. See
Resolving and rendering for how each evaluation
kind is graded.