{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Requirement",
  "type": "object",
  "required": ["id", "title", "objective", "scope", "acceptanceCriteria", "nfrs", "status"],
  "properties": {
    "id": { "type": "string" },
    "title": { "type": "string" },
    "objective": { "type": "string" },
    "status": { "type": "string", "enum": ["backlog", "wip", "in-progress", "done", "archived"] },
    "actors": { "type": "array", "items": { "type": "string" } },
    "scope": {
      "type": "object",
      "required": ["in", "out"],
      "properties": {
        "in": { "type": "array", "items": { "type": "string" } },
        "out": { "type": "array", "items": { "type": "string" } }
      }
    },
    "acceptanceCriteria": { "type": "array", "items": { "type": "string" } },
    "nfrs": {
      "type": "object",
      "properties": {
        "security": { "type": "string" },
        "performance": { "type": "string" },
        "availability": { "type": "string" }
      }
    },
    "constraints": { "type": "array", "items": { "type": "string" } },
    "risks": { "type": "array", "items": { "type": "string" } },
    "links": { "type": "array", "items": { "type": "string" } },
    "updatedAt": { "type": "string" }
  }
}
