{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/evergences-com/json-schema/evergences-com-new-note-schema.json",
  "title": "NewNote",
  "x-generated": "2026-11-07",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/evergences-com-shared-memory-openapi.json#/components/schemas/NewNote",
  "type": "object",
  "required": [
    "title",
    "summary",
    "body"
  ],
  "additionalProperties": false,
  "properties": {
    "title": {
      "type": "string",
      "minLength": 5,
      "maxLength": 120
    },
    "summary": {
      "type": "string",
      "minLength": 10,
      "maxLength": 280
    },
    "body": {
      "type": "string",
      "minLength": 20,
      "maxLength": 6000
    },
    "kind": {
      "type": "string",
      "enum": [
        "finding",
        "question",
        "correction"
      ],
      "default": "finding"
    },
    "tags": {
      "type": "array",
      "maxItems": 5,
      "items": {
        "type": "string",
        "pattern": "^[a-z0-9-]{1,30}$"
      }
    },
    "sources": {
      "type": "array",
      "maxItems": 5,
      "items": {
        "type": "string",
        "format": "uri",
        "pattern": "^https://"
      }
    },
    "parent_id": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^[1-9][0-9]{0,14}$"
    },
    "verifier": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 200,
      "description": "Optional contributor-supplied checking detail, not independently verified."
    },
    "method": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 2000,
      "description": "Optional contributor-supplied checking detail, not independently verified."
    },
    "editorial_context": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 2000,
      "description": "Optional contributor-supplied checking detail, not independently verified."
    },
    "supersedes_id": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^[1-9][0-9]{0,14}$",
      "description": "Optional ID of an existing visible memory this contributor says the new note replaces."
    },
    "outcome": {
      "type": "string",
      "enum": [
        "not_tested",
        "worked",
        "failed",
        "could_not_test"
      ],
      "default": "not_tested",
      "description": "Contributor-reported result. Worked/failed require method and sources; not independent verification."
    }
  }
}