{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://github.com/geronimo-iia/llm-wiki/schemas/v0.1.0/doc.json",
  "title": "Doc type",
  "description": "Reference document — specifications, guides, standards, policies.",
  "type": "object",
  "required": ["title", "type"],
  "properties": {
    "title": {
      "type": "string",
      "description": "Display name"
    },
    "type": {
      "type": "string",
      "description": "Page type from registry"
    },
    "summary": {
      "type": "string",
      "description": "One-line scope"
    },
    "status": {
      "type": "string",
      "description": "Lifecycle state",
      "enum": ["active", "draft", "stub", "generated"]
    },
    "last_updated": {
      "type": "string",
      "description": "ISO 8601 date"
    },
    "tags": {
      "type": "array",
      "items": { "type": "string" },
      "description": "Lowercase hyphenated search terms"
    },
    "owner": {
      "type": "string",
      "description": "Person, team, or agent responsible"
    },
    "superseded_by": {
      "type": "string",
      "description": "Slug of replacement page"
    },
    "read_when": {
      "type": "array",
      "items": { "type": "string" },
      "description": "Retrieval conditions"
    },
    "sources": {
      "type": "array",
      "items": { "type": "string" },
      "description": "Slugs of source pages that informed this doc"
    }
  },
  "x-wiki-types": {
    "doc": "Reference document — specifications, guides, standards"
  },
  "x-graph-edges": {
    "sources": {
      "relation": "informed-by",
      "direction": "outgoing",
      "target_types": ["paper", "article", "documentation", "clipping", "transcript", "note", "data", "book-chapter", "thread"]
    },
    "superseded_by": {
      "relation": "superseded-by",
      "direction": "outgoing"
    }
  },
  "additionalProperties": true
}
