{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://chainchoice.io/methodology/spec/archetype-taxonomy.schema.json",
  "title": "ChainChoice Archetype Taxonomy",
  "description": "Level 1 of the cognitive stack — Intent. Archetypes summarize who the user is and what posture they're acting from. Derived from the wizard signals (experience_level, country_context, decision_weight, decision_style, primary_goal). Used as a coarse cohort for cross-cohort analytics on the dashboard.",
  "type": "object",
  "required": ["archetype_id", "label", "criteria"],
  "properties": {
    "archetype_id": {
      "type": "string",
      "enum": [
        "first_time_cautious_eu",
        "first_time_cautious_us",
        "first_time_cautious_emea",
        "working_knowledge_yield_seeker",
        "working_knowledge_cross_border_operator",
        "advanced_native_defi_operator",
        "advanced_treasury_lead",
        "advanced_tax_year_close",
        "broker_referrer",
        "embedded_partner_integration"
      ]
    },
    "label": {
      "type": "string",
      "description": "Display label for surfaces and dashboards."
    },
    "criteria": {
      "type": "object",
      "description": "Boolean predicates over wizard signals. All must match for the archetype to apply; first-match wins when multiple apply.",
      "additionalProperties": { "type": ["string", "array", "boolean"] }
    },
    "preferred_decision_style_prior": {
      "type": "string",
      "enum": [
        "lowest_regret",
        "balanced_precision",
        "best_fit",
        "speed_first",
        "evidence_maximalist",
        "deliberative_comparator"
      ],
      "description": "Bayesian prior — what decision_style we'd expect before observing behavior. Used as a smoothing prior when the classifier has low confidence."
    },
    "expected_categories": {
      "type": "array",
      "items": { "type": "string" },
      "description": "Categories this archetype typically engages."
    }
  }
}
