Leji context index
Generated map of the context layer. Never hand-maintained; regenerate on change.
Fields
-
#
schemaVersionstring required -
The Leji spec line this artifact was written against, e.g. "1.0".
Pattern
^\d+\.\d+$ -
#
generatedAtstring required -
ISO 8601 timestamp when the index was generated.
Pattern
^\d{4}-\d{2}-\d{2}[T ].+$ -
#
generatorobject -
The tool that generated this index.
namestringName of the generating tool, e.g. "leji".
versionstringVersion of the generating tool.
-
#
rootPathstring required -
Context root the entries are relative to; mirrors the manifest's rootPath.
Pattern
^(?!/)(?!\./)(?!.*(^|/)\.\.(/|$))(?!.*\\).*$ -
#
entriesarray of objects required -
One entry per indexed document in the context layer.
idstring requiredStable identifier; renames and moves update the path, never the id.
pathstring requiredRepository-root-relative path to the document.
titlestring requiredHuman-readable title, from the document's first heading or frontmatter.
category"domain" · "system" · "practice" · "governance" · "decisions" requiredWhich content category this document belongs to.
summarystringOne-line summary of the document, for routing and navigation.
tagsarray of stringsOptional free-form tags.
ownersarray of stringsOptional owners of this document.
lastModifiedstringISO 8601 date the document last changed, from version control where available.
contentHashstringHash of the document's contents, used to detect drift and stable moves.
freshnessobjectReview horizon for this document.
reviewAfterstringISO 8601 date after which the document should be reviewed for staleness.
linksarray of stringsOptional outbound references from this document.
Schema and example
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://leji.org/schemas/v1.0/context-index.schema.json",
"title": "Leji context index",
"description": "Generated map of the context layer. Never hand-maintained; regenerate on change.",
"type": "object",
"required": [
"schemaVersion",
"generatedAt",
"rootPath",
"entries"
],
"additionalProperties": false,
"properties": {
"$schema": {
"description": "Optional pointer to this schema, for editor validation and tooling.",
"type": "string"
},
"schemaVersion": {
"description": "The Leji spec line this artifact was written against, e.g. \"1.0\".",
"type": "string",
"pattern": "^\\d+\\.\\d+$"
},
"generatedAt": {
"description": "ISO 8601 timestamp when the index was generated.",
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}[T ].+$"
},
"generator": {
"description": "The tool that generated this index.",
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"description": "Name of the generating tool, e.g. \"leji\".",
"type": "string"
},
"version": {
"description": "Version of the generating tool.",
"type": "string"
}
}
},
"rootPath": {
"description": "Context root the entries are relative to; mirrors the manifest's rootPath.",
"type": "string",
"pattern": "^(?!/)(?!\\./)(?!.*(^|/)\\.\\.(/|$))(?!.*\\\\).*$"
},
"entries": {
"description": "One entry per indexed document in the context layer.",
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"path",
"title",
"category"
],
"additionalProperties": false,
"properties": {
"id": {
"description": "Stable identifier; renames and moves update the path, never the id.",
"type": "string",
"pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
},
"path": {
"description": "Repository-root-relative path to the document.",
"type": "string",
"pattern": "^(?!/)(?!\\./)(?!.*(^|/)\\.\\.(/|$))(?!.*\\\\).+$"
},
"title": {
"description": "Human-readable title, from the document's first heading or frontmatter.",
"type": "string",
"minLength": 1
},
"category": {
"description": "Which content category this document belongs to.",
"enum": [
"domain",
"system",
"practice",
"governance",
"decisions"
]
},
"summary": {
"description": "One-line summary of the document, for routing and navigation.",
"type": "string"
},
"tags": {
"description": "Optional free-form tags.",
"type": "array",
"items": {
"type": "string"
}
},
"owners": {
"description": "Optional owners of this document.",
"type": "array",
"items": {
"type": "string"
}
},
"lastModified": {
"description": "ISO 8601 date the document last changed, from version control where available.",
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}([T ].*)?$"
},
"contentHash": {
"description": "Hash of the document's contents, used to detect drift and stable moves.",
"type": "string"
},
"freshness": {
"description": "Review horizon for this document.",
"type": "object",
"additionalProperties": false,
"properties": {
"reviewAfter": {
"description": "ISO 8601 date after which the document should be reviewed for staleness.",
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
}
}
},
"links": {
"description": "Optional outbound references from this document.",
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
} A generated context index, regenerated by the SDK on change.
{
"$schema": "https://leji.org/schemas/v1.0/context-index.schema.json",
"schemaVersion": "1.0",
"generatedAt": "2026-06-14T05:29:10.448Z",
"generator": {
"name": "leji",
"version": "1.0.0"
},
"rootPath": "docs/",
"entries": [
{
"id": "adopt-leji",
"path": "docs/decisions/0001-adopt-leji.md",
"title": "Adopt the Leji context layer",
"category": "decisions",
"lastModified": "2026-06-14",
"contentHash": "sha256:9680ba24ad268894"
},
{
"id": "glossary",
"path": "docs/domain/glossary.md",
"title": "Glossary",
"category": "domain",
"summary": "What invoice, credit note, and settlement mean at Acme.",
"lastModified": "2026-06-13",
"contentHash": "sha256:22d9bcc4fe0ce860"
},
{
"id": "system-invariants",
"path": "docs/system/invariants.md",
"title": "System Invariants",
"category": "system",
"summary": "Money handling, ledger append-only rule, service boundaries.",
"lastModified": "2026-06-13",
"contentHash": "sha256:6e179b4fa71bd5ad",
"freshness": {
"reviewAfter": "2026-12-10"
}
}
]
}