{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://eclypse-sanctuary.feycarp32.chatgpt.site/open/solar-memory.schema.json",
  "title": "Solar Memory proposed-memory interchange",
  "description": "Open interchange structure; no private room prompts or workbook included. Imported decisions are declarations, not hosted approval.",
  "type": "object",
  "required": [
    "schema",
    "fields",
    "confidence",
    "review_date",
    "decision",
    "history"
  ],
  "properties": {
    "schema": {
      "const": "eclypse.memory-draft.v1"
    },
    "fields": {
      "type": "object",
      "required": [
        "source",
        "context",
        "observation",
        "interpretation",
        "evidence",
        "uncertainty",
        "boundary",
        "lesson",
        "proposal",
        "permission",
        "reviewer",
        "reason"
      ],
      "additionalProperties": false,
      "properties": {
        "source": {
          "type": "string",
          "maxLength": 1200
        },
        "context": {
          "type": "string",
          "maxLength": 1200
        },
        "observation": {
          "type": "string",
          "maxLength": 1200
        },
        "interpretation": {
          "type": "string",
          "maxLength": 1200
        },
        "evidence": {
          "type": "string",
          "maxLength": 1200
        },
        "uncertainty": {
          "type": "string",
          "maxLength": 1200
        },
        "boundary": {
          "type": "string",
          "maxLength": 1200
        },
        "lesson": {
          "type": "string",
          "maxLength": 1200
        },
        "proposal": {
          "type": "string",
          "maxLength": 1200
        },
        "permission": {
          "type": "string",
          "maxLength": 1200
        },
        "reviewer": {
          "type": "string",
          "maxLength": 1200
        },
        "reason": {
          "type": "string",
          "maxLength": 1200
        }
      }
    },
    "confidence": {
      "enum": [
        "undecided",
        "low",
        "medium",
        "high"
      ]
    },
    "review_date": {
      "type": "string",
      "pattern": "^(|[0-9]{4}-[0-9]{2}-[0-9]{2})$"
    },
    "decision": {
      "enum": [
        "draft",
        "retain",
        "revise",
        "decline"
      ]
    },
    "history": {
      "type": "array",
      "maxItems": 20,
      "items": {
        "type": "object",
        "required": [
          "at",
          "action"
        ],
        "properties": {
          "at": {
            "type": "string",
            "maxLength": 30
          },
          "action": {
            "type": "string",
            "maxLength": 80
          }
        },
        "additionalProperties": false
      }
    }
  },
  "additionalProperties": false
}
