{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://crayon-c4.com/schema/v1/crayon-c4-decisions.schema.json",
  "title": "CRAYON-C4 Decisions File",
  "description": "Stand-alone extract of a project's architecture decisions (ADRs), produced by the Decisions screen's 'Decisions file (.json)' export. Importing one into a project ADDS its new decisions and UPDATES existing ones by id — decisions the file does not mention are never removed. The import also accepts a whole project export carrying an adr slice. The adr payload is exactly the project bundle's adr slice ($defs/AdrData in crayon-c4.schema.json); field-level contract in docs/reference/07-adr-schema.md.",
  "type": "object",
  "required": ["schemaVersion", "kind", "adr"],
  "properties": {
    "schemaVersion": { "const": 1, "description": "File contract version. Must be 1." },
    "kind": { "const": "crayon-c4-decisions", "description": "File marker so a random .json can't be mistaken for a decisions file." },
    "createdAt": { "type": "string", "description": "ISO timestamp the file was produced." },
    "project": { "type": "string", "description": "Name of the project the decisions were extracted from. Provenance only — import ignores it." },
    "adr": { "$ref": "crayon-c4.schema.json#/$defs/AdrData" }
  }
}
