{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://stephenklahr.com/downloads/scale-agent-kit-v0.6/schemas/scale-workspace.schema.json",
  "title": "SCALE portable workspace 0.6",
  "description": "Canonical portable state. Schema validation checks shape; validate-scale.mjs separately checks references, evidence cutoffs, reviews, typed endpoints and continuation. Neither proves factual truth or enforces enterprise permissions. Patch 0.6.1 preserves explicitly unknown source dates; temporal qualifications and receipt dates never substitute for invented source metadata.",
  "type": "object",
  "properties": {
    "scaleVersion": {
      "const": "0.6"
    },
    "workspace": {
      "$ref": "#/$defs/workspace"
    },
    "charter": {
      "$ref": "#/$defs/charter"
    },
    "evidence": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/evidence"
      }
    },
    "elements": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/element"
      }
    },
    "relationships": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/relationship"
      }
    },
    "reviews": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/review"
      }
    },
    "proposals": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/proposal"
      }
    },
    "analyses": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/analysis"
      }
    },
    "decisions": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/decision"
      }
    },
    "openItems": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/openItem"
      }
    },
    "maintenance": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/maintenance"
      }
    },
    "history": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/history"
      }
    },
    "continuation": {
      "$ref": "#/$defs/continuation"
    }
  },
  "required": [
    "scaleVersion",
    "workspace",
    "charter",
    "evidence",
    "elements",
    "relationships",
    "reviews",
    "proposals",
    "analyses",
    "decisions",
    "openItems",
    "maintenance",
    "history",
    "continuation"
  ],
  "additionalProperties": false,
  "$defs": {
    "workspace": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
        },
        "name": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        },
        "status": {
          "enum": [
            "draft",
            "active",
            "paused",
            "completed",
            "retired"
          ]
        },
        "leadBusinessArchitect": {
          "type": "string"
        },
        "exportId": {
          "type": "string",
          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
        },
        "priorExportId": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
            },
            {
              "type": "null"
            }
          ]
        },
        "exportedAt": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "recordPurpose": {
          "enum": [
            "working-record",
            "authored-fictional-example"
          ]
        },
        "caseVersion": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1,
              "pattern": "\\S"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "id",
        "name",
        "status",
        "leadBusinessArchitect",
        "exportId",
        "priorExportId",
        "exportedAt",
        "recordPurpose",
        "caseVersion"
      ],
      "additionalProperties": false
    },
    "charter": {
      "type": "object",
      "properties": {
        "businessQuestion": {
          "type": "string"
        },
        "decisionSupported": {
          "type": "string"
        },
        "decisionOwner": {
          "type": "string"
        },
        "audience": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "pattern": "\\S"
          }
        },
        "includedScope": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "pattern": "\\S"
          }
        },
        "excludedScope": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "pattern": "\\S"
          }
        },
        "requiredWorkProduct": {
          "type": "string"
        },
        "sufficiencyCondition": {
          "type": "string"
        },
        "stopCondition": {
          "type": "string"
        },
        "episode": {
          "anyOf": [
            {
              "enum": [
                "A",
                "B",
                "C"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "evidenceCutoff": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "businessQuestion",
        "decisionSupported",
        "decisionOwner",
        "audience",
        "includedScope",
        "excludedScope",
        "requiredWorkProduct",
        "sufficiencyCondition",
        "stopCondition",
        "episode",
        "evidenceCutoff"
      ],
      "additionalProperties": false
    },
    "evidenceLink": {
      "type": "object",
      "properties": {
        "evidenceId": {
          "type": "string",
          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
        },
        "claimId": {
          "type": "string",
          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
        },
        "locator": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        },
        "supports": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        },
        "temporalUse": {
          "enum": [
            "period-specific",
            "undated-context"
          ],
          "description": "Default period-specific. Undated-context may support a qualified observation or lead, not a claim that it applied in a stated period."
        },
        "temporalLimitation": {
          "type": "string",
          "minLength": 16,
          "pattern": "\\S",
          "description": "Specific limitation carried into the claim when using undated context. Required semantically for undated-context."
        }
      },
      "required": [
        "evidenceId",
        "claimId",
        "locator",
        "supports"
      ],
      "additionalProperties": false
    },
    "sourceRef": {
      "type": "object",
      "properties": {
        "location": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        },
        "locator": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        },
        "supports": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        }
      },
      "required": [
        "location",
        "locator",
        "supports"
      ],
      "additionalProperties": false
    },
    "evidence": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
        },
        "title": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        },
        "owner": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        },
        "authority": {
          "enum": [
            "governed-authority",
            "linked-authority",
            "supporting-evidence",
            "context-only",
            "excluded",
            "unknown"
          ]
        },
        "location": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        },
        "availableAt": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "description": "When the evidence became available, if established. Null means unknown; explain in dateLimitations.availableAt."
        },
        "effectiveFrom": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "description": "Beginning of the source's applicable period, if established. Null means unknown; explain in dateLimitations.effectiveFrom."
        },
        "effectiveTo": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        },
        "reviewDate": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        },
        "accessClass": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        },
        "claims": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
              },
              "statement": {
                "type": "string",
                "minLength": 1,
                "pattern": "\\S"
              },
              "locator": {
                "type": "string",
                "minLength": 1,
                "pattern": "\\S"
              }
            },
            "required": [
              "id",
              "statement",
              "locator"
            ],
            "additionalProperties": false
          }
        },
        "limitations": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "pattern": "\\S"
          }
        },
        "disposition": {
          "enum": [
            "included",
            "limited",
            "excluded",
            "pending"
          ]
        },
        "receivedAt": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "description": "Actual documented receipt by this workspace. A known receipt establishes only that the evidence was held by then; it does not invent its original availability or applicable period."
        },
        "dateLimitations": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "availableAt": {
              "type": "string",
              "minLength": 16,
              "pattern": "\\S"
            },
            "effectiveFrom": {
              "type": "string",
              "minLength": 16,
              "pattern": "\\S"
            }
          },
          "description": "For each null source date, explain why it is unknown and how that limits use. Do not use a placeholder such as 'unknown'."
        }
      },
      "required": [
        "id",
        "title",
        "owner",
        "authority",
        "location",
        "availableAt",
        "effectiveFrom",
        "effectiveTo",
        "reviewDate",
        "accessClass",
        "claims",
        "limitations",
        "disposition"
      ],
      "additionalProperties": false
    },
    "element": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
        },
        "version": {
          "type": "integer",
          "minimum": 1
        },
        "status": {
          "enum": [
            "proposed",
            "accepted",
            "superseded",
            "retired",
            "rejected"
          ]
        },
        "owner": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        },
        "scope": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        },
        "effectiveFrom": {
          "type": "string",
          "format": "date"
        },
        "effectiveTo": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        },
        "reviewDate": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        },
        "accessClass": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        },
        "classification": {
          "enum": [
            "fact",
            "inference",
            "assumption",
            "recommendation",
            "conflict",
            "unknown"
          ]
        },
        "confidence": {
          "enum": [
            "high",
            "medium",
            "low",
            "insufficient"
          ]
        },
        "confidenceBasis": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        },
        "evidenceLinks": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/evidenceLink"
          }
        },
        "sourceRefs": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/sourceRef"
          }
        },
        "reviewId": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
            },
            {
              "type": "null"
            }
          ]
        },
        "supersedes": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
            },
            {
              "type": "null"
            }
          ]
        },
        "type": {
          "enum": [
            "objective",
            "value-stream",
            "value-stream-stage",
            "capability",
            "business-object",
            "organization",
            "initiative",
            "release",
            "measure",
            "alternative",
            "policy"
          ]
        },
        "name": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        },
        "definition": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        }
      },
      "required": [
        "id",
        "version",
        "status",
        "owner",
        "scope",
        "effectiveFrom",
        "effectiveTo",
        "reviewDate",
        "accessClass",
        "classification",
        "confidence",
        "confidenceBasis",
        "evidenceLinks",
        "sourceRefs",
        "reviewId",
        "supersedes",
        "type",
        "name",
        "definition"
      ],
      "additionalProperties": false
    },
    "relationship": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
        },
        "version": {
          "type": "integer",
          "minimum": 1
        },
        "status": {
          "enum": [
            "proposed",
            "accepted",
            "superseded",
            "retired",
            "rejected"
          ]
        },
        "owner": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        },
        "scope": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        },
        "effectiveFrom": {
          "type": "string",
          "format": "date"
        },
        "effectiveTo": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        },
        "reviewDate": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        },
        "accessClass": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        },
        "classification": {
          "enum": [
            "fact",
            "inference",
            "assumption",
            "recommendation",
            "conflict",
            "unknown"
          ]
        },
        "confidence": {
          "enum": [
            "high",
            "medium",
            "low",
            "insufficient"
          ]
        },
        "confidenceBasis": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        },
        "evidenceLinks": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/evidenceLink"
          }
        },
        "sourceRefs": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/sourceRef"
          }
        },
        "reviewId": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
            },
            {
              "type": "null"
            }
          ]
        },
        "supersedes": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
            },
            {
              "type": "null"
            }
          ]
        },
        "sourceId": {
          "type": "string",
          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
        },
        "type": {
          "enum": [
            "guides",
            "contains",
            "enables",
            "supplies-signal-to",
            "governs",
            "measures",
            "changes",
            "part-of",
            "evaluates",
            "accountable-for",
            "supports",
            "depends-on"
          ]
        },
        "targetId": {
          "type": "string",
          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
        }
      },
      "required": [
        "id",
        "version",
        "status",
        "owner",
        "scope",
        "effectiveFrom",
        "effectiveTo",
        "reviewDate",
        "accessClass",
        "classification",
        "confidence",
        "confidenceBasis",
        "evidenceLinks",
        "sourceRefs",
        "reviewId",
        "supersedes",
        "sourceId",
        "type",
        "targetId"
      ],
      "additionalProperties": false
    },
    "review": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
        },
        "targetType": {
          "enum": [
            "elements",
            "relationships",
            "analyses",
            "decisions"
          ]
        },
        "targetIds": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
          },
          "minItems": 1,
          "uniqueItems": true
        },
        "disposition": {
          "enum": [
            "accept",
            "modify",
            "reject",
            "investigate"
          ]
        },
        "reviewer": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        },
        "reviewerRole": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        },
        "reviewedAt": {
          "type": "string",
          "format": "date-time"
        },
        "rationale": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        },
        "requiredChange": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1,
              "pattern": "\\S"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "id",
        "targetType",
        "targetIds",
        "disposition",
        "reviewer",
        "reviewerRole",
        "reviewedAt",
        "rationale",
        "requiredChange"
      ],
      "additionalProperties": false
    },
    "proposal": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
        },
        "kind": {
          "enum": [
            "element",
            "relationship",
            "finding",
            "correction",
            "retirement"
          ]
        },
        "targetType": {
          "enum": [
            "elements",
            "relationships",
            "analyses",
            "decisions"
          ]
        },
        "targetIds": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
          },
          "minItems": 1,
          "uniqueItems": true
        },
        "statement": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        },
        "evidenceLinks": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/evidenceLink"
          }
        },
        "classification": {
          "enum": [
            "fact",
            "inference",
            "assumption",
            "recommendation",
            "conflict",
            "unknown"
          ]
        },
        "confidence": {
          "enum": [
            "high",
            "medium",
            "low",
            "insufficient"
          ]
        },
        "confidenceBasis": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        },
        "requiredChange": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1,
              "pattern": "\\S"
            },
            {
              "type": "null"
            }
          ]
        },
        "status": {
          "enum": [
            "pending",
            "reviewed"
          ]
        },
        "reviewId": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "id",
        "kind",
        "targetType",
        "targetIds",
        "statement",
        "evidenceLinks",
        "classification",
        "confidence",
        "confidenceBasis",
        "requiredChange",
        "status",
        "reviewId"
      ],
      "additionalProperties": false
    },
    "analysis": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
        },
        "question": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        },
        "statement": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        },
        "classification": {
          "enum": [
            "fact",
            "inference",
            "assumption",
            "recommendation",
            "conflict",
            "unknown"
          ]
        },
        "confidence": {
          "enum": [
            "high",
            "medium",
            "low",
            "insufficient"
          ]
        },
        "confidenceBasis": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        },
        "scope": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        },
        "asOf": {
          "type": "string",
          "format": "date-time"
        },
        "status": {
          "enum": [
            "proposed",
            "accepted",
            "rejected",
            "superseded"
          ]
        },
        "path": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
          }
        },
        "evidenceLinks": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/evidenceLink"
          }
        },
        "sourceRefs": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/sourceRef"
          }
        },
        "conflicts": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "pattern": "\\S"
          }
        },
        "implication": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        },
        "nextAction": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        },
        "reviewId": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
            },
            {
              "type": "null"
            }
          ]
        },
        "supersedes": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "id",
        "question",
        "statement",
        "classification",
        "confidence",
        "confidenceBasis",
        "scope",
        "asOf",
        "status",
        "path",
        "evidenceLinks",
        "sourceRefs",
        "conflicts",
        "implication",
        "nextAction",
        "reviewId",
        "supersedes"
      ],
      "additionalProperties": false
    },
    "decision": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
        },
        "type": {
          "enum": [
            "decision",
            "exception",
            "override",
            "correction"
          ]
        },
        "statement": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        },
        "owner": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        },
        "decidedAt": {
          "type": "string",
          "format": "date-time"
        },
        "conditions": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "pattern": "\\S"
          }
        },
        "rationale": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        },
        "evidenceLinks": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/evidenceLink"
          }
        },
        "affectedArchitectureIds": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
          }
        },
        "status": {
          "enum": [
            "active",
            "closed",
            "superseded"
          ]
        },
        "reviewDate": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        },
        "reviewTrigger": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        },
        "expiresAt": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "reviewId": {
          "type": "string",
          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
        },
        "supersedes": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "id",
        "type",
        "statement",
        "owner",
        "decidedAt",
        "conditions",
        "rationale",
        "evidenceLinks",
        "affectedArchitectureIds",
        "status",
        "reviewDate",
        "reviewTrigger",
        "expiresAt",
        "reviewId",
        "supersedes"
      ],
      "additionalProperties": false
    },
    "openItem": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
        },
        "type": {
          "enum": [
            "unknown",
            "conflict",
            "missing-owner",
            "missing-evidence",
            "correction",
            "review"
          ]
        },
        "description": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        },
        "consequence": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        },
        "owner": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        },
        "requiredAction": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        },
        "dueDate": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        },
        "status": {
          "enum": [
            "open",
            "in-progress",
            "blocked",
            "closed"
          ]
        },
        "closedAt": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "resolution": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1,
              "pattern": "\\S"
            },
            {
              "type": "null"
            }
          ]
        },
        "relatedIds": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
          }
        }
      },
      "required": [
        "id",
        "type",
        "description",
        "consequence",
        "owner",
        "requiredAction",
        "dueDate",
        "status",
        "closedAt",
        "resolution",
        "relatedIds"
      ],
      "additionalProperties": false
    },
    "maintenance": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
        },
        "architectureIds": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
          },
          "minItems": 1
        },
        "governingSource": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        },
        "steward": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        },
        "reviewTrigger": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        },
        "reviewDate": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        },
        "reuseScenarios": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "pattern": "\\S"
          }
        },
        "retirementCondition": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        }
      },
      "required": [
        "id",
        "architectureIds",
        "governingSource",
        "steward",
        "reviewTrigger",
        "reviewDate",
        "reuseScenarios",
        "retirementCondition"
      ],
      "additionalProperties": false
    },
    "history": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
        },
        "recordedAt": {
          "type": "string",
          "format": "date-time"
        },
        "actor": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        },
        "targetType": {
          "enum": [
            "elements",
            "relationships",
            "analyses",
            "decisions",
            "openItems",
            "workspace"
          ]
        },
        "targetIds": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
          }
        },
        "action": {
          "enum": [
            "created",
            "reviewed",
            "corrected",
            "superseded",
            "closed",
            "continued"
          ]
        },
        "rationale": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        },
        "priorExportId": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
            },
            {
              "type": "null"
            }
          ]
        },
        "changes": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "path": {
                "type": "string",
                "minLength": 1,
                "pattern": "\\S"
              },
              "before": {},
              "after": {}
            },
            "required": [
              "path",
              "before",
              "after"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "id",
        "recordedAt",
        "actor",
        "targetType",
        "targetIds",
        "action",
        "rationale",
        "priorExportId",
        "changes"
      ],
      "additionalProperties": false
    },
    "continuation": {
      "type": "object",
      "properties": {
        "nextQuestion": {
          "type": "string"
        },
        "requiredEvidence": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "pattern": "\\S"
          }
        },
        "reviewsDue": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "pattern": "\\S"
          }
        },
        "reusableIds": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
          }
        },
        "notCurrentIds": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
          }
        },
        "disposition": {
          "enum": [
            "continue",
            "extend",
            "redesign",
            "retire"
          ]
        },
        "instructions": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "pattern": "\\S"
          }
        }
      },
      "required": [
        "nextQuestion",
        "requiredEvidence",
        "reviewsDue",
        "reusableIds",
        "notCurrentIds",
        "disposition",
        "instructions"
      ],
      "additionalProperties": false
    }
  }
}
