{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://docs.connectsoft.ai/reference/schemas/blueprint-test.schema.json",
  "title": "Test Blueprint (blueprint-test-v1)",
  "description": "Descriptor document of the Test Blueprint kind (BC-02). Validated by BlueprintService; metadata per blueprint-common.schema.json; generation outputs and validation rules per model/blueprints.yaml.",
  "type": "object",
  "required": [
    "metadata",
    "levels",
    "invariantCoverage",
    "acceptance",
    "thresholds"
  ],
  "additionalProperties": false,
  "properties": {
    "metadata": {
      "$ref": "blueprint-common.schema.json#/$defs/Metadata"
    },
    "levels": {
      "type": "array",
      "items": {
        "enum": [
          "unit",
          "integration",
          "acceptance",
          "architecture",
          "performance",
          "security"
        ]
      }
    },
    "invariantCoverage": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "aggregate",
          "invariant",
          "tests"
        ],
        "properties": {
          "aggregate": {
            "type": "string"
          },
          "invariant": {
            "type": "string"
          },
          "tests": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": false
      }
    },
    "acceptance": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "featureId",
          "scenario"
        ],
        "properties": {
          "featureId": {
            "type": "string"
          },
          "scenario": {
            "type": "string"
          },
          "tool": {
            "enum": [
              "Reqnroll"
            ]
          }
        },
        "additionalProperties": false
      }
    },
    "thresholds": {
      "type": "object",
      "required": [
        "coverageMin"
      ],
      "properties": {
        "coverageMin": {
          "type": "number"
        },
        "maxFailed": {
          "type": "integer"
        }
      },
      "additionalProperties": false
    }
  }
}
