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

# leji string 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+$

# name string required

A short, stable identifier for this context layer, e.g. "acme-billing-context".

# description string

One-line summary of what this context layer covers.

# rootPath string 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 ^(?!/)(?!\./)(?!.*(^|/)\.\.(/|$))(?!.*\\).*$

# bootProfilePath string required

Path to the boot profile, the agent-agnostic entrypoint every host and person starts from.

Pattern ^(?!/)(?!\./)(?!.*(^|/)\.\.(/|$))(?!.*\\).+\.md$

# categories object required

Logical category to path mapping. Keys are the five category identifiers.

domain object

Where domain content lives: business language and product semantics.

paths array of strings required

One or more repository-root-relative paths where this category's content lives.

system object

Where system content lives: architecture and the invariants every change respects.

paths array of strings required

One or more repository-root-relative paths where this category's content lives.

practice object

Where practice content lives: conventions and proven patterns.

paths array of strings required

One or more repository-root-relative paths where this category's content lives.

governance object

Where governance content lives: agent guardrails and operating rules.

paths array of strings required

One or more repository-root-relative paths where this category's content lives.

decisions object

Where decision records live: dated records of why things are the way they are.

paths array of strings required

One or more repository-root-relative paths where this category's content lives.

# machine object

Locations of the machine-readable artifacts: index, changelog, profiles, and decision records.

indexPath string

Path to the generated context index.

changelogPath string

Path to the machine-readable context changelog.

agentProfilesPath string

Directory holding agent profile documents.

decisionRecordsPath string

Directory holding decision records.

# agents map

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.

# owners object 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).

primary object required

The person accountable for the context layer's currency. Ownerless context layers rot.

name string required

The person's name.

contact string

How to reach them, e.g. an email address.

continuity object

Optional. 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.

name string required

The person's name.

contact string

How to reach them, e.g. an email address.

# conformance object

The conformance level this context layer claims, checkable by tooling.

claimedLevel "core" · "indexed" · "governed" · "federated"

The conformance level claimed: core, indexed, governed, or federated.

claimedAt string

ISO 8601 date the claim was last asserted.

# federation object

Sibling layers mounted into this repository (spec: distribution.md pattern 3). The circle composes ownership; it doesn't centralize it.

mounts array of objects

Each mount is a docs-only sibling layer at a pinned version, keeping its own repository, ownership, and review gate.

path string required

Where the sibling layer is mounted in this repository, e.g. "context/product/". The sibling's own leji.json lives at this path's root.

name string required

The sibling layer's name; must match the `name` in the sibling's own manifest.

owner object required

The owner of the sibling layer. Ownership stays with the sibling's team; the host never absorbs its content.

role string

What this sibling layer carries, e.g. "product-side context".

source string

Upstream repository URL of the sibling layer. Optional; enables stale-pin reporting when git submodule metadata alone isn't available.

# vendorAdapters array of strings

Vendor entrypoint files present in this repository; each must redirect to the boot profile.

# docs object

Presentation preferences read by `leji docs`. Non-normative convenience configuration; presentation itself is out of normative scope.

port integer

Preferred 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.