Schema
JSON Schema
Dialect: draft 2020-12 · License: MIT
In plain terms: a schema is an automatic checklist. It lets any tool — or you, in one command — confirm that a package file is built correctly.
Every .ctxpkg can be validated mechanically. The schemas below are
the normative machine-readable companions to the prose
specification — where the two disagree, the prose specification wins and
the schema gets an erratum.
context-package-v2.schema.json Current draft Validates v2 packages: manifest, graph format, node/edge shapes, conformance levels, signature block.
context-package-v1.schema.json Superseded Validates legacy v1 packages (five static layers). Kept for tools reading old archives.
Validating a package
# with ajv (Node)
npx ajv-cli validate \
-s https://ctxpkg.org/schemas/context-package-v2.schema.json \
-d my-package.ctxpkg --spec=draft2020
# with check-jsonschema (Python)
pip install check-jsonschema
check-jsonschema \
--schemafile https://ctxpkg.org/schemas/context-package-v2.schema.json \
my-package.ctxpkg Schema stability
Published schema URLs are permanent. Within a major version, changes are
additive only (new optional properties). Schema $ids follow the
pattern https://ctxpkg.org/schemas/context-package-v{N}.schema.json.