spec 1.0 · 規範

Leji コンテキスト変更履歴

AI エージェントの支援による翻訳です。内容に相違がある場合は、英語版ページが優先されます。文章に問題を見つけた際は、Issueまたはプルリクエストをお願いします。

コンテキストレイヤーの変更を、追記のみで残す機械可読な記録です。

正規の $idhttps://leji.org/schemas/v1.0/context-changelog.schema.json
生ファイル:context-changelog.schema.json

フィールド

#schemaVersionstring必須

この成果物が書かれた対象の Leji 仕様系列です。たとえば "1.0"。

パターン ^\d+\.\d+$

#entriesオブジェクトの配列必須

コンテキストレイヤーの変更です。正典の順序は (date, id) の昇順に並べることで導かれ、配列上の位置には意味がありません。新しいエントリはどこに現れても構いません。最も古いものは、compaction エントリを添えて圧縮できます。エントリは少なくともひとつ必要です。生まれたときから空の変更履歴は妥当ではなく、圧縮は必ず自らの compaction エントリを残していくからです。

idstring必須

この変更エントリの安定した識別子です。変更履歴の中で一意です。

datestring必須

UTC の ISO 8601 です。暦日 YYYY-MM-DD(その日の始まりとして順序づけられます)か、Z で終わる完全なタイムスタンプ(たとえば 2026-06-13T15:04:05Z)のどちらかです。オフセットとゾーンのない時刻は許されないので、辞書順がそのまま時系列順になります。

type"added" · "changed" · "deprecated" · "removed" · "fixed" · "decision" · "governance" · "compaction"必須

変更の種別です。

summarystring必須

何が変わったのかを、一行で述べます。

paths文字列の配列必須

その変更が影響したパスです。リポジトリルートからの相対で、少なくともひとつ必要です。compaction エントリは、畳み込んだパスの和集合を記録します。その和集合が空のときは、変更履歴自身のパスを記録します。

categories"domain" · "system" · "practice" · "governance" · "decisions" の配列

その変更が触れたコンテンツカテゴリです。

decisionRefs文字列の配列

この変更に関係する決定記録の id です。

proposedBystring

その変更を提案した人またはエージェントです。

approvedBystring

その変更を承認した人です。

breakingboolean

その変更が、コンテキストレイヤーの利用側を壊すかどうかです。

compactedobject

compaction エントリでは必須です。その圧縮が最も古い側から何を取り除いたのかを示します。

entriesinteger必須

この圧縮が最も古い側から取り除いたエントリの件数です。

firstIdstring必須

この圧縮が取り除いたうち、最も古いエントリの id です。

lastIdstring必須

この圧縮が取り除いたうち、最も新しいエントリの id です。

スキーマと実例

{
  "$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"
          ]
        }
      }
    }
  }
}

コンテキストレイヤーの変更を記録した、機械可読な変更履歴です。

{
  "$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": "コンテキストレイヤーを立ち上げた。ブートプロファイル、用語集、システムの不変条件、最初の決定記録。",
      "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": "thought-partner のエージェントプロファイルを追加し、マニフェストの agents マップでロールに結び付けた。",
      "paths": [
        "docs/agents/thought-partner.md",
        "leji.json"
      ],
      "proposedBy": "agent:claude",
      "approvedBy": "Jo Lee"
    },
    {
      "id": "ownership-to-platform-team",
      "date": "2026-09-11",
      "type": "governance",
      "summary": "コンテキストレイヤーの所有権を Jo Lee から Acme Platform Team に引き継いだ。",
      "paths": [
        "leji.json"
      ],
      "approvedBy": "Acme Platform Team"
    }
  ]
}

← スキーマ一覧