Expand description
The projections of a .proto document schema.
The .proto is canonical and nothing else is written by hand. Two artifacts come out
of it here:
the JSON Schema beside it, which the Rust indexer validates front matter against and
from which share/allow/<name>.txt is derived, so the shell tool and the executable
read one contract rather than two;
the section list share/sections/<name>.txt, which is the body half of the contract
in the plainest form a shell can read.
Both are tracked, because bin/majordomus doctor is pure shell and must validate a
fresh checkout without a Rust build having ever run. scripts/derive-check regenerates
them and fails on a difference, which is what keeps “canonical” true.
Constants§
- DERIVED_
EXTENSION - The extension naming the
.protoa JSON Schema was derived from. A schema that carries it is not to be edited; the file it names is. - SCHEMA_
EXTENSION - The extension carrying the schema identity on a derived JSON Schema.
- SECTIONS_
EXTENSION - The extension carrying the body contract, for a reader of the JSON Schema alone.
Functions§
- schema_
path - The file name a schema identity derives for its JSON Schema projection, relative to the
schema root:
majordomus.adr/v1ismajordomus/adr/adr.v1.schema.json. - section_
lines - The section list the shell tool reads: one section per line, tab-separated, in document
order — level, heading,
required/optional,non-empty/any. A kind with no body contract projects an empty file, which is an answer rather than a missing artifact. - to_
json_ schema - The whole document as one JSON Schema:
headeragainst theHeadermessage, and for a Markdown kindbodyagainst the sections theBodymessage names.