spec 1.0 · normative

Leji context changelog

Append-only machine-readable record of context layer changes.

Canonical $id:https://leji.org/schemas/v1.0/context-changelog.schema.json
Raw file:context-changelog.schema.json

Fields

#schemaVersionstringrequired

The Leji spec line this artifact was written against, e.g. "1.0".

Pattern ^\d+\.\d+$

#entriesarray of objectsrequired

Context layer changes. Canonical order is derived by sorting on (date, id) ascending; array position is not significant. New entries may appear anywhere; the oldest may be compacted with a compaction entry. At least one entry: a born-empty changelog is invalid, and compaction always leaves its compaction entry behind.

idstringrequired

Stable identifier for this change entry, unique within the changelog.

datestringrequired

ISO 8601 in UTC: a calendar date YYYY-MM-DD (ordered as start of day) or a full timestamp ending in Z, e.g. 2026-06-13T15:04:05Z. Offsets and zoneless times are not allowed, so lexical order is chronological.

type"added" · "changed" · "deprecated" · "removed" · "fixed" · "decision" · "governance" · "compaction"required

The kind of change.

summarystringrequired

One-line description of what changed.

pathsarray of stringsrequired

Repository-root-relative paths the change affected. At least one; a compaction entry records the union of the paths it folded, or the changelog's own path when that union is empty.

categoriesarray of "domain" · "system" · "practice" · "governance" · "decisions"

Content categories the change touched.

decisionRefsarray of strings

Ids of decision records related to this change.

proposedBystring

Human or agent that proposed the change.

approvedBystring

Human who approved the change.

breakingboolean

Whether the change breaks consumers of the context layer.

compactedobject

Required on compaction entries: what the compaction removed from the oldest end.

entriesintegerrequired

How many entries this compaction removed from the oldest end.

firstIdstringrequired

Id of the oldest entry removed by this compaction.

lastIdstringrequired

Id of the newest entry removed by this compaction.

Schema and example

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://leji.org/schemas/v1.0/context-changelog.schema.json",
  "title": "Leji context changelog",
  "description": "Append-only machine-readable record of context layer changes.",
  "type": "object",
  "required": [
    "schemaVersion",
    "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+$"
    },
    "entries": {
      "description": "Context layer changes. Canonical order is derived by sorting on (date, id) ascending; array position is not significant. New entries may appear anywhere; the oldest may be compacted with a compaction entry. At least one entry: a born-empty changelog is invalid, and compaction always leaves its compaction entry behind.",
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "required": [
          "id",
          "date",
          "type",
          "summary",
          "paths"
        ],
        "additionalProperties": false,
        "properties": {
          "id": {
            "description": "Stable identifier for this change entry, unique within the changelog.",
            "type": "string",
            "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
          },
          "date": {
            "description": "ISO 8601 in UTC: a calendar date YYYY-MM-DD (ordered as start of day) or a full timestamp ending in Z, e.g. 2026-06-13T15:04:05Z. Offsets and zoneless times are not allowed, so lexical order is chronological.",
            "type": "string",
            "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])(T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\dZ)?$"
          },
          "type": {
            "description": "The kind of change.",
            "enum": [
              "added",
              "changed",
              "deprecated",
              "removed",
              "fixed",
              "decision",
              "governance",
              "compaction"
            ]
          },
          "summary": {
            "description": "One-line description of what changed.",
            "type": "string",
            "minLength": 1
          },
          "paths": {
            "description": "Repository-root-relative paths the change affected. At least one; a compaction entry records the union of the paths it folded, or the changelog's own path when that union is empty.",
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "string",
              "pattern": "^(?!/)(?!\\./)(?!.*(^|/)\\.\\.(/|$))(?!.*\\\\).+$"
            }
          },
          "categories": {
            "description": "Content categories the change touched.",
            "type": "array",
            "items": {
              "enum": [
                "domain",
                "system",
                "practice",
                "governance",
                "decisions"
              ]
            }
          },
          "decisionRefs": {
            "description": "Ids of decision records related to this change.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "proposedBy": {
            "type": "string",
            "description": "Human or agent that proposed the change."
          },
          "approvedBy": {
            "type": "string",
            "description": "Human who approved the change."
          },
          "breaking": {
            "description": "Whether the change breaks consumers of the context layer.",
            "type": "boolean"
          },
          "compacted": {
            "type": "object",
            "description": "Required on compaction entries: what the compaction removed from the oldest end.",
            "required": [
              "entries",
              "firstId",
              "lastId"
            ],
            "additionalProperties": false,
            "properties": {
              "entries": {
                "description": "How many entries this compaction removed from the oldest end.",
                "type": "integer",
                "minimum": 1
              },
              "firstId": {
                "description": "Id of the oldest entry removed by this compaction.",
                "type": "string",
                "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
              },
              "lastId": {
                "description": "Id of the newest entry removed by this compaction.",
                "type": "string",
                "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
              }
            }
          }
        },
        "if": {
          "properties": {
            "type": {
              "const": "compaction"
            }
          },
          "required": [
            "type"
          ]
        },
        "then": {
          "required": [
            "compacted"
          ]
        }
      }
    }
  }
}

A machine-readable changelog of context layer changes.

{
  "$schema": "https://leji.org/schemas/v1.0/context-changelog.schema.json",
  "schemaVersion": "1.0",
  "entries": [
    {
      "id": "seed-layer",
      "date": "2026-06-10",
      "type": "added",
      "summary": "Seeded the context layer: boot profile, glossary, system invariants, first decision record.",
      "paths": [
        "docs/boot-profile.md",
        "docs/domain/glossary.md",
        "docs/system/invariants.md",
        "docs/decisions/0001-adopt-leji.md"
      ],
      "categories": [
        "domain",
        "system",
        "decisions"
      ],
      "proposedBy": "agent:claude",
      "approvedBy": "Jo Lee"
    },
    {
      "id": "thought-partner-profile",
      "date": "2026-06-12",
      "type": "added",
      "summary": "Added the thought-partner agent profile and bound it to the role in the manifest agents map.",
      "paths": [
        "docs/agents/thought-partner.md",
        "leji.json"
      ],
      "proposedBy": "agent:claude",
      "approvedBy": "Jo Lee"
    }
  ]
}

← All schemas