{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://fusioncx.com/library/evaluation-record.schema.json",
  "title": "FusionCX evaluation record schema",
  "description": "Fields, codes and scales recorded by the engineer at ticket close. Included with Support. Replace enums with your taxonomy; schema changes on 15 days' notice.",
  "version": "2026-09-03",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "ticket_id",
    "closed_at",
    "severity",
    "objective",
    "diagnosis_class",
    "output_met_objective",
    "objective_scale",
    "capabilities_used",
    "attempts",
    "consent_for_evaluation"
  ],
  "properties": {
    "ticket_id": {
      "type": "string",
      "description": "Id in your helpdesk. Redact or hash if this file leaves your boundary."
    },
    "closed_at": {
      "type": "string",
      "format": "date-time"
    },
    "severity": {
      "type": "string",
      "enum": ["P1", "P2", "P3", "P4"]
    },
    "objective": {
      "type": "string",
      "description": "The customer's stated objective in one line, not the symptom."
    },
    "diagnosis_class": {
      "type": "string",
      "description": "Classification of the platform's automated diagnosis.",
      "enum": ["confirmed", "partially_correct", "incorrect"]
    },
    "reason_code": {
      "type": "string",
      "description": "Required when diagnosis_class is not confirmed. Use your reason-code taxonomy.",
      "examples": ["dns_propagation_assumed", "stale_build_target", "connector_auth_expired"]
    },
    "correct_diagnosis": {
      "type": "string",
      "description": "Required when diagnosis_class is partially_correct or incorrect."
    },
    "output_met_objective": {
      "type": "string",
      "enum": ["yes", "partial", "no"]
    },
    "objective_scale": {
      "type": "integer",
      "minimum": 1,
      "maximum": 5,
      "description": "1 = did not meet the objective; 5 = met it without engineer intervention."
    },
    "capabilities_used": {
      "type": "array",
      "items": { "type": "string" },
      "description": "Named product capabilities the engineer actually used."
    },
    "attempts": {
      "type": "integer",
      "minimum": 1
    },
    "customer_verbatim": {
      "type": "string",
      "description": "Verbatim feedback. Redact names, emails, domains, project ids."
    },
    "verbatim_taxonomy": {
      "type": "string",
      "description": "Coded to your taxonomy, e.g. deploy.domain.misbinding."
    },
    "defect_observed": {
      "type": "boolean"
    },
    "defect_repro_steps": {
      "type": "array",
      "items": { "type": "string" },
      "description": "Minimal steps. Test accounts only; never a live customer application."
    },
    "consent_for_evaluation": {
      "type": "boolean",
      "description": "False if the customer has not consented or has opted out. Record is still stored for operations; exclude from training pipelines."
    },
    "redaction": {
      "type": "object",
      "properties": {
        "spans_removed": { "type": "integer", "minimum": 0 },
        "categories": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": ["personal_data", "credentials", "api_keys", "secrets", "end_user_data", "customer_identifiers"]
          }
        }
      }
    }
  },
  "allOf": [
    {
      "if": {
        "properties": { "diagnosis_class": { "const": "confirmed" } },
        "required": ["diagnosis_class"]
      },
      "else": {
        "required": ["reason_code", "correct_diagnosis"]
      }
    }
  ],
  "examples": [
    {
      "ticket_id": "PX-2291-REDACTED",
      "closed_at": "2026-08-14T13:41:00Z",
      "severity": "P2",
      "objective": "Ship checkout with saved cards",
      "diagnosis_class": "partially_correct",
      "reason_code": "dns_propagation_assumed",
      "correct_diagnosis": "Edge proxy bound to stale build target",
      "output_met_objective": "no",
      "objective_scale": 2,
      "capabilities_used": ["domain_config", "deploy_logs", "rebuild"],
      "attempts": 2,
      "customer_verbatim": "It said it deployed but the domain 502s",
      "verbatim_taxonomy": "deploy.domain.misbinding",
      "defect_observed": true,
      "defect_repro_steps": [
        "Attach a custom domain to a staging app",
        "Deploy a new build without rebinding the edge target",
        "Request the domain; observe 502",
        "Rebind target, purge edge cache, verify 200"
      ],
      "consent_for_evaluation": true,
      "redaction": {
        "spans_removed": 4,
        "categories": ["customer_identifiers", "personal_data"]
      }
    }
  ]
}
