{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://example.com/schemas/qa-contract.schema.json",
  "title": "QA Contract",
  "type": "object",
  "required": ["description", "commands", "required_before_ready", "future_testing_backlog"],
  "properties": {
    "description": { "type": "string", "minLength": 1 },
    "required_before_ready": { "const": "npm run qa:all" },
    "commands": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "required": ["command", "checks"],
        "properties": {
          "command": { "type": "string", "minLength": 1 },
          "checks": {
            "type": "array",
            "minItems": 1,
            "items": { "type": "string", "minLength": 1 }
          }
        }
      }
    },
    "future_testing_backlog": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["id", "status", "priority", "title", "rationale", "files", "completionCriteria"]
      }
    }
  }
}
