{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://yarramate.org/schema/workspace/v1",
  "title": "YarraMate workspace manifest",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "format",
    "id",
    "documents",
    "profiles",
    "projections",
    "adapterMappings"
  ],
  "properties": {
    "format": {
      "const": "yarramate/workspace/v1"
    },
    "id": {
      "$ref": "#/$defs/id"
    },
    "documents": {
      "$ref": "#/$defs/patterns"
    },
    "profiles": {
      "$ref": "#/$defs/patterns"
    },
    "projections": {
      "$ref": "#/$defs/patterns"
    },
    "patterns": {
      "description": "yarramate/pattern/v1 documents: the shape a concept kind promises, and the wiring the compiler mints between an instance and the parts it binds (ADR 0123). Structure, where profiles declare vocabulary. Optional, like evidence and contracts.",
      "$ref": "#/$defs/patterns"
    },
    "questions": {
      "description": "yarramate/question-catalogue/v1 documents the WORKSPACE carries: questions true of this engagement and nowhere else (#345, ADR 0129). ADDITIVE to the shipped catalogue rather than replacing it, which is what --catalogue and MountOptions.catalogue do. Question ids are qualified as catalogue#question on the way out, so two catalogues may carry the same local id. A wave is declared exactly once across the resolved set, and any catalogue may contribute questions to a wave it did not declare. Optional, like patterns, evidence and contracts.",
      "$ref": "#/$defs/patterns"
    },
    "adapterMappings": {
      "$ref": "#/$defs/patterns"
    },
    "evidence": {
      "$ref": "#/$defs/patterns"
    },
    "contracts": {
      "$ref": "#/$defs/patterns"
    },
    "coverage": {
      "description": "Glob patterns naming the artifacts the model intends to cover (#175, ADR 0130). NOT a document category: nothing here is loaded or compiled. reconcile resolves the patterns against the root of the git repository the manifest lives in and reports every selected file no evidence observation claims. Opt-in; absent means coverage is not assessed and the reconciliation report says so.",
      "$ref": "#/$defs/patterns"
    }
  },
  "$defs": {
    "id": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$"
    },
    "patterns": {
      "type": "array",
      "uniqueItems": true,
      "items": {
        "type": "string",
        "minLength": 1
      }
    }
  }
}
