The manifest: leji.json
The machine entrypoint of a Leji context layer. Lives at the repository root as leji.json.
The manifest is the only fixed filename in Leji: the one file tooling can always expect at the repository root. Field rows are generated from the schema, so the page and the contract cannot disagree. Required fields carry the gold mark.
Fields
-
#
lejistring required -
The Leji spec line this context layer targets, e.g. "1.0". The self-naming key follows the OpenAPI convention and identifies the file as a Leji manifest.
Pattern
^\d+\.\d+$ -
#
namestring required -
A short, stable identifier for this context layer, e.g. "acme-billing-context".
-
#
descriptionstring -
One-line summary of what this context layer covers.
-
#
rootPathstring required -
Context root, POSIX path relative to the repository root. Declares where the context layer lives; it does not re-base other paths: all paths in all Leji artifacts resolve from the repository root.
Pattern
^(?!/)(?!\./)(?!.*(^|/)\.\.(/|$))(?!.*\\).*$ -
#
bootProfilePathstring required -
Path to the boot profile, the agent-agnostic entrypoint every host and person starts from.
Pattern
^(?!/)(?!\./)(?!.*(^|/)\.\.(/|$))(?!.*\\).+\.md$ -
#
categoriesobject required -
Logical category to path mapping. Keys are the five category identifiers.
domainobjectWhere domain content lives: business language and product semantics.
pathsarray of strings requiredOne or more repository-root-relative paths where this category's content lives.
systemobjectWhere system content lives: architecture and the invariants every change respects.
pathsarray of strings requiredOne or more repository-root-relative paths where this category's content lives.
practiceobjectWhere practice content lives: conventions and proven patterns.
pathsarray of strings requiredOne or more repository-root-relative paths where this category's content lives.
governanceobjectWhere governance content lives: agent guardrails and operating rules.
pathsarray of strings requiredOne or more repository-root-relative paths where this category's content lives.
decisionsobjectWhere decision records live: dated records of why things are the way they are.
pathsarray of strings requiredOne or more repository-root-relative paths where this category's content lives.
-
#
machineobject -
Locations of the machine-readable artifacts: index, changelog, profiles, and decision records.
indexPathstringPath to the generated context index.
changelogPathstringPath to the machine-readable context changelog.
agentProfilesPathstringDirectory holding agent profile documents.
decisionRecordsPathstringDirectory holding decision records.
-
#
agentsmap -
Role to agent-profile binding. Keys are role identifiers (e.g. "thought-partner", "reviewer"); values are paths to agent profile documents. Protocols engage roles; this map decides who fills them.
-
#
ownersobject required -
Who is accountable for the context layer's health. Owners answer for the context layer staying current and pruned; they do not author or curate it alone (governance.md).
primaryobject requiredThe person accountable for the context layer's currency. Ownerless context layers rot.
namestring requiredThe person's name.
contactstringHow to reach them, e.g. an email address.
continuityobjectOptional. A different person who carries the same accountability when the primary is unavailable or steps away; assisted adoptions should name one before outside help leaves. Naming the primary again provides no continuity, and an agent cannot fill it: owners are accountable people.
namestring requiredThe person's name.
contactstringHow to reach them, e.g. an email address.
-
#
conformanceobject -
The conformance level this context layer claims, checkable by tooling.
claimedLevel"core" · "indexed" · "governed" · "federated"The conformance level claimed: core, indexed, governed, or federated.
claimedAtstringISO 8601 date the claim was last asserted.
-
#
federationobject -
Sibling layers mounted into this repository (spec: distribution.md pattern 3). The circle composes ownership; it doesn't centralize it.
mountsarray of objectsEach mount is a docs-only sibling layer at a pinned version, keeping its own repository, ownership, and review gate.
pathstring requiredWhere the sibling layer is mounted in this repository, e.g. "context/product/". The sibling's own leji.json lives at this path's root.
namestring requiredThe sibling layer's name; must match the `name` in the sibling's own manifest.
ownerobject requiredThe owner of the sibling layer. Ownership stays with the sibling's team; the host never absorbs its content.
rolestringWhat this sibling layer carries, e.g. "product-side context".
sourcestringUpstream repository URL of the sibling layer. Optional; enables stale-pin reporting when git submodule metadata alone isn't available.
-
#
vendorAdaptersarray of strings -
Vendor entrypoint files present in this repository; each must redirect to the boot profile.
-
#
docsobject -
Presentation preferences read by `leji docs`. Non-normative convenience configuration; presentation itself is out of normative scope.
portintegerPreferred local-preview port for `leji docs --serve`. The --port flag overrides; the default is 5354 (LEJI on a phone keypad).
A complete example
This complete manifest validates against the schema and exercises every field: a federated, organization-wide context layer that mounts a sibling. Most context layers use only the subset they need; this one uses all of them.
{
"$schema": "https://leji.org/schemas/v1.0/context-manifest.schema.json",
"leji": "1.0",
"name": "acme-context",
"description": "Organization-wide context layer for Acme: consumed by product repos and composing one sibling layer.",
"rootPath": "docs/",
"bootProfilePath": "docs/boot-profile.md",
"categories": {
"domain": { "paths": ["docs/domain/"] },
"system": { "paths": ["docs/system/"] },
"practice": { "paths": ["docs/practice/"] },
"governance": { "paths": ["docs/governance/"] },
"decisions": { "paths": ["docs/decisions/"] }
},
"machine": {
"indexPath": "docs/context-index.json",
"changelogPath": "docs/context-changelog.json",
"agentProfilesPath": "docs/agents/",
"decisionRecordsPath": "docs/decisions/"
},
"agents": {
"core": "docs/agents/core.md",
"thought-partner": "docs/agents/thought-partner.md"
},
"owners": {
"primary": { "name": "Sam Park", "contact": "sam@acme.example" },
"continuity": { "name": "Ada Okafor", "contact": "ada@acme.example" }
},
"conformance": {
"claimedLevel": "federated",
"claimedAt": "2026-06-12"
},
"federation": {
"mounts": [
{
"path": "docs/product-context/",
"name": "acme-product-context",
"owner": { "name": "Product team", "contact": "product@acme.example" },
"role": "product-side context, owned and curated by the product team",
"source": "https://github.com/acme/product-context"
}
]
},
"vendorAdapters": ["CLAUDE.md", "AGENTS.md"],
"docs": {
"port": 5354
}
}
See the machine-readable surface for how the manifest relates to the index,
changelog, and profiles, and
versioning for the leji spec-line key.