{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://altheia.local/schemas/altheia-sector-blueprint-architect-configuration-1.6.schema.json",
  "title": "ALTHEIA Sector Blueprint Architect Configuration 1.6",
  "type": "object",
  "additionalProperties": false,
  "required": ["schema_version", "module", "module_version", "saved_at", "assistant_answers", "briefing", "artifacts", "sector_pack_input", "normalization", "validation", "approval"],
  "properties": {
    "schema_version": {"const": "altheia_sector_blueprint_architect_configuration_1.6"},
    "module": {"const": "identity_corpus_sector_blueprint_architect"},
    "module_version": {"const": "1.6"},
    "saved_at": {"type": "string", "format": "date-time"},
    "assistant_answers": {
      "type": "object",
      "additionalProperties": false,
      "required": ["assistantSector", "assistantObjective", "assistantAudience", "assistantKnowledge", "assistantConstraints"],
      "properties": {
        "assistantSector": {"type": "string"},
        "assistantObjective": {"type": "string"},
        "assistantAudience": {"type": "string"},
        "assistantKnowledge": {"type": "string"},
        "assistantConstraints": {"type": "string"}
      }
    },
    "briefing": {
      "type": "object",
      "additionalProperties": false,
      "required": ["sectorName", "sectorId", "description", "markets", "languages", "actors", "offer", "lifecycle", "channels", "decisions", "relationship", "regulation", "researchGoals", "sources", "coreMinimum", "archetypeStrategy", "businessModels"],
      "properties": {
        "sectorName": {"type": "string"},
        "sectorId": {"type": "string"},
        "description": {"type": "string"},
        "markets": {"type": "string"},
        "languages": {"type": "string"},
        "actors": {"type": "string"},
        "offer": {"type": "string"},
        "lifecycle": {"type": "string"},
        "channels": {"type": "string"},
        "decisions": {"type": "string"},
        "relationship": {"type": "string"},
        "regulation": {"type": "string"},
        "researchGoals": {"type": "string"},
        "sources": {"type": "string"},
        "coreMinimum": {"enum": ["30", "33", "36", "39"]},
        "archetypeStrategy": {"enum": ["hybrid", "general", "sector"]},
        "businessModels": {"type": "array", "items": {"enum": ["B2C", "B2B", "B2B2C"]}, "uniqueItems": true}
      }
    },
    "artifacts": {
      "type": "object",
      "additionalProperties": false,
      "required": ["assistant_prompt", "research_brief", "prompt_pack", "blueprint", "improvement_prompt", "improvement_request", "improvement_patch"],
      "properties": {
        "assistant_prompt": {"type": ["string", "null"]},
        "research_brief": {"type": ["string", "null"]},
        "prompt_pack": {"type": ["string", "null"]},
        "blueprint": {"type": ["object", "null"]},
        "improvement_prompt": {"type": ["string", "null"]},
        "improvement_request": {"type": ["object", "null"]},
        "improvement_patch": {"type": ["object", "null"]}
      }
    },
    "sector_pack_input": {"type": ["string", "object", "null"]},
    "normalization": {"type": ["object", "null"]},
    "validation": {"type": ["object", "null"]},
    "approval": {
      "type": "object",
      "additionalProperties": false,
      "required": ["reviewer", "research_reviewed", "domain_reviewed", "measurement_reviewed", "applicability_reviewed", "notes", "approved_at"],
      "properties": {
        "reviewer": {"type": "string"},
        "research_reviewed": {"type": "boolean"},
        "domain_reviewed": {"type": "boolean"},
        "measurement_reviewed": {"type": "boolean"},
        "applicability_reviewed": {"type": "boolean"},
        "notes": {"type": "string"},
        "approved_at": {"type": ["string", "null"], "format": "date-time"}
      }
    }
  }
}

