{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://limecloud.github.io/agentapp/schemas/app-requirements.schema.json",
  "title": "Agent App Requirements Contract",
  "description": "v0.7 business requirements, MVP scope, non-goals, and acceptance criteria.",
  "type": "object",
  "properties": {
    "requirements": {
      "type": "array",
      "items": { "$ref": "#/$defs/requirement" }
    },
    "nonGoals": {
      "type": "array",
      "items": { "type": "string" }
    },
    "later": {
      "type": "array",
      "items": { "type": "string" }
    }
  },
  "$defs": {
    "requirement": {
      "type": "object",
      "required": ["id", "text"],
      "properties": {
        "id": { "type": "string", "minLength": 1 },
        "text": { "type": "string", "minLength": 1 },
        "priority": { "type": "string", "enum": ["mvp", "p1", "p2", "later", "out_of_scope"] },
        "acceptance": { "type": "array", "items": { "type": "string" } },
        "nonGoals": { "type": "array", "items": { "type": "string" } },
        "risks": { "type": "array", "items": { "type": "string" } }
      },
      "additionalProperties": true
    }
  },
  "additionalProperties": true
}
