{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://wifo.dev/schemas/factory-core/spec-frontmatter.json",
  "title": "Factory Spec Frontmatter",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "classification": {
      "type": "string",
      "enum": [
        "light",
        "deep"
      ]
    },
    "type": {
      "type": "string",
      "enum": [
        "feat",
        "fix",
        "refactor",
        "chore",
        "perf"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "ready",
        "drafting",
        "blocked"
      ]
    },
    "exemplars": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string",
            "minLength": 1
          },
          "why": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "path",
          "why"
        ],
        "additionalProperties": false
      },
      "default": []
    },
    "depends-on": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "default": []
    },
    "agent-timeout-ms": {
      "type": "integer",
      "exclusiveMinimum": 0
    }
  },
  "required": [
    "id",
    "classification",
    "type",
    "status"
  ],
  "additionalProperties": false
}
