Skip to main content

Module metadata

Module metadata 

Source
Expand description

Metadata: the kind schema (kinds.yaml) and one JSON Schema per kind, both read at run time from the tool distribution’s share directory and, when a repository adds its own, from .ai/repo/knowledge/; and the YAML helpers shared by every reader. The contract is documented in docs/CAPABILITIES.md and in share/kinds.yaml itself.

Modules§

frontmatter
Front matter: the metadata block at the top of a document of the layer.
yaml
The layer’s YAML subset, as docs/SCHEMAS.md and the shell tool’s mj_yaml_flatten define it: key: value, nested maps by two-space indent, block lists (- item), lists of maps (- key: value plus indented keys), inline lists [a, b], single or double quotes, comments. Tabs, odd indentation, anchors, multi-line scalars and flow maps are refused with the line named (the shell parser reads an anchor or alias as text; this one refuses it, which is the stricter reading of the same contract). A scalar is a string unless it is an unquoted integer or true/false; nothing else is interpreted.

Structs§

KindSchema
The kind schema with every JSON Schema it names compiled.
KindSpec
One entry of kinds.yaml.
Schema
One JSON Schema, compiled, with where it came from.
SchemaSet
Schemas gathered from the distribution and the repository, each name once.
SchemaVersion
A field whose value must be one of the listed ones: an integer (version: 1) or a string (schema: context/v1).
Violation
One failed constraint of a validation.

Enums§

Format
How a file of a kind is read.
FrontMatterRule
Whether a Markdown kind must, may, or does not carry front matter.

Constants§

KINDS_SCHEMA
The one schema version this executable reads.
REPO_KINDS_FILE
The file, under the manifest’s knowledge section, in which a repository adds kinds.
REPO_SCHEMAS_DIR
The directory, under the manifest’s knowledge section, in which a repository adds schemas.