{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://thruput.se/agents/schemas/governance/standards.schema.json",
  "title": "Standards",
  "description": "The standards: entries whose parent is a rule, each implementing it for one technology",
  "type": "object",
  "required": [
    "standards"
  ],
  "properties": {
    "standards": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Standard"
      }
    }
  },
  "$defs": {
    "Standard": {
      "description": "One standard: how a rule is implemented for one technology",
      "$ref": "entry.schema.json#/$defs/Entry",
      "required": [
        "context"
      ],
      "properties": {
        "id": {
          "$ref": "#/$defs/StandardId"
        },
        "parent": {
          "$ref": "rules.schema.json#/$defs/RuleId"
        },
        "context": {
          "$ref": "#/$defs/Context"
        }
      }
    },
    "StandardId": {
      "$ref": "id.schema.json"
    },
    "Context": {
      "description": "The single technology a standard applies to, such as a language, a schema dialect, or a tool",
      "type": "string",
      "minLength": 1
    }
  },
  "examples": [
    {
      "standards": [
        {
          "id": "Example standard",
          "context": "Example tool",
          "parent": "Example rule",
          "body": "`example` is never `false`."
        }
      ]
    }
  ]
}
