{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://github.com/yosefdot/implannotator/schemas/config.schema.json",
  "title": "Implannotator configuration",
  "type": "object",
  "properties": {
    "schemaVersion": { "const": 1 },
    "approval": {
      "type": "object",
      "properties": {
        "required": { "const": true },
        "allowLowRiskAutoApprove": { "type": "boolean", "default": false },
        "proceedRequiresSecondConfirmation": { "const": true },
        "browserTimeoutMs": { "type": "integer", "minimum": 1000 }
      },
      "additionalProperties": false
    },
    "repairs": {
      "type": "object",
      "properties": {
        "maxAttempts": { "type": "integer", "minimum": 0, "maximum": 3 },
        "reopenOnlyForFinalReview": { "const": true }
      },
      "additionalProperties": false
    },
    "qa": {
      "type": "object",
      "properties": {
        "defaultProfile": { "enum": ["adaptive", "quick", "standard", "full"] },
        "requireEvidence": { "type": "boolean" }
      },
      "additionalProperties": false
    },
    "audit": {
      "type": "object",
      "properties": {
        "directory": { "type": "string", "default": ".implannotator/runs" },
        "retentionDays": { "type": "integer", "minimum": 1 },
        "redactSensitiveValues": { "const": true }
      },
      "additionalProperties": false
    },
    "git": {
      "type": "object",
      "properties": {
        "allowAutomaticCommit": { "const": false },
        "allowAutomaticStash": { "const": false },
        "preserveExistingChanges": { "const": true }
      },
      "additionalProperties": false
    },
    "subagents": {
      "type": "object",
      "properties": {
        "enabled": { "type": "boolean" },
        "readOnly": { "const": true },
        "mainAgentSoleWriter": { "const": true }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}
