{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://evemisslab.example/schemas/tcft-audit-v0.1.schema.json",
  "title": "TCFT Audit Record v0.1",
  "type": "object",
  "required": [
    "audit_id",
    "subject",
    "artifact",
    "cutoff_time",
    "provenance",
    "baseline",
    "capability_profile",
    "evidence_profile",
    "frontier_status",
    "audit_version"
  ],
  "properties": {
    "audit_id": {
      "type": "string"
    },
    "audit_version": {
      "type": "string",
      "const": "0.1"
    },
    "subject": {
      "type": "object",
      "required": [
        "subject_id",
        "subject_type"
      ],
      "properties": {
        "subject_id": {
          "type": "string"
        },
        "subject_type": {
          "enum": [
            "Human",
            "AI",
            "HumanAI",
            "Team",
            "Institution",
            "Artifact"
          ]
        },
        "display_name": {
          "type": [
            "string",
            "null"
          ]
        },
        "identity_claims": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "claim": {
                "type": "string"
              },
              "source": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "status": {
                "enum": [
                  "CLAIM_ONLY",
                  "EXTERNAL_ATTRIBUTION",
                  "UNRESOLVED"
                ]
              }
            },
            "required": [
              "claim",
              "status"
            ]
          }
        }
      },
      "additionalProperties": true
    },
    "artifact": {
      "type": "object",
      "required": [
        "artifact_id",
        "artifact_type"
      ],
      "properties": {
        "artifact_id": {
          "type": "string"
        },
        "artifact_type": {
          "type": "string"
        },
        "title": {
          "type": [
            "string",
            "null"
          ]
        },
        "source_uri": {
          "type": [
            "string",
            "null"
          ]
        },
        "source_hash": {
          "type": [
            "string",
            "null"
          ]
        },
        "first_verified_time": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "version_status": {
          "enum": [
            "VERIFIED",
            "PARTIAL",
            "AMBIGUOUS",
            "UNRESOLVED"
          ]
        }
      }
    },
    "cutoff_time": {
      "type": "string",
      "format": "date-time"
    },
    "provenance": {
      "type": "object",
      "required": [
        "timestamp_confidence",
        "version_confidence"
      ],
      "properties": {
        "timestamp_confidence": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "version_confidence": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "archive_refs": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "warnings": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "prior_art": {
      "type": "object",
      "properties": {
        "provider_versions": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "languages": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "coverage_confidence": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "matches": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "match_class": {
                "enum": [
                  "S0_NO_RELEVANT_MATCH",
                  "S1_LEXICAL_OVERLAP",
                  "S2_CONCEPTUAL_OVERLAP",
                  "S3_STRUCTURAL_PARTIAL",
                  "S4_OPERATIONAL_NEAR_MATCH",
                  "S5_SUBSTANTIVE_OPERATIONAL_PRIOR_ART"
                ]
              },
              "source": {
                "type": "string"
              },
              "date": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "notes": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "match_class",
              "source"
            ]
          }
        }
      }
    },
    "baseline": {
      "type": "object",
      "required": [
        "baseline_version",
        "members",
        "contamination_status"
      ],
      "properties": {
        "baseline_version": {
          "type": "string"
        },
        "members": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "baseline_id",
              "kind",
              "contamination_class"
            ],
            "properties": {
              "baseline_id": {
                "type": "string"
              },
              "kind": {
                "enum": [
                  "general",
                  "expert",
                  "frontier",
                  "tool",
                  "AI",
                  "humanAI",
                  "institutional"
                ]
              },
              "model_or_method": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "contamination_class": {
                "enum": [
                  "C0",
                  "C1",
                  "C2",
                  "C3",
                  "C4"
                ]
              },
              "primary_eligible": {
                "type": "boolean"
              }
            }
          }
        },
        "contamination_status": {
          "enum": [
            "CLEAN",
            "RISK_ACCEPTED",
            "CONTAMINATED",
            "UNRESOLVED"
          ]
        }
      }
    },
    "capability_profile": {
      "type": "object",
      "required": [
        "BS",
        "CF",
        "RR",
        "RG",
        "TN",
        "PG",
        "RP",
        "NC"
      ],
      "properties": {
        "BS": {
          "type": "object",
          "required": [
            "status"
          ],
          "properties": {
            "raw_score": {
              "type": [
                "number",
                "null"
              ]
            },
            "normalized_score": {
              "type": [
                "number",
                "null"
              ]
            },
            "confidence": {
              "type": [
                "number",
                "null"
              ],
              "minimum": 0,
              "maximum": 1
            },
            "status": {
              "enum": [
                "MEASURED",
                "EXPERIMENTAL",
                "UNRESOLVED",
                "NOT_APPLICABLE"
              ]
            },
            "metric_version": {
              "type": [
                "string",
                "null"
              ]
            },
            "warnings": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        },
        "CF": {
          "type": "object",
          "required": [
            "status"
          ],
          "properties": {
            "raw_score": {
              "type": [
                "number",
                "null"
              ]
            },
            "normalized_score": {
              "type": [
                "number",
                "null"
              ]
            },
            "confidence": {
              "type": [
                "number",
                "null"
              ],
              "minimum": 0,
              "maximum": 1
            },
            "status": {
              "enum": [
                "MEASURED",
                "EXPERIMENTAL",
                "UNRESOLVED",
                "NOT_APPLICABLE"
              ]
            },
            "metric_version": {
              "type": [
                "string",
                "null"
              ]
            },
            "warnings": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        },
        "RR": {
          "type": "object",
          "required": [
            "status"
          ],
          "properties": {
            "raw_score": {
              "type": [
                "number",
                "null"
              ]
            },
            "normalized_score": {
              "type": [
                "number",
                "null"
              ]
            },
            "confidence": {
              "type": [
                "number",
                "null"
              ],
              "minimum": 0,
              "maximum": 1
            },
            "status": {
              "enum": [
                "MEASURED",
                "EXPERIMENTAL",
                "UNRESOLVED",
                "NOT_APPLICABLE"
              ]
            },
            "metric_version": {
              "type": [
                "string",
                "null"
              ]
            },
            "warnings": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        },
        "RG": {
          "type": "object",
          "required": [
            "status"
          ],
          "properties": {
            "raw_score": {
              "type": [
                "number",
                "null"
              ]
            },
            "normalized_score": {
              "type": [
                "number",
                "null"
              ]
            },
            "confidence": {
              "type": [
                "number",
                "null"
              ],
              "minimum": 0,
              "maximum": 1
            },
            "status": {
              "enum": [
                "MEASURED",
                "EXPERIMENTAL",
                "UNRESOLVED",
                "NOT_APPLICABLE"
              ]
            },
            "metric_version": {
              "type": [
                "string",
                "null"
              ]
            },
            "warnings": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        },
        "TN": {
          "type": "object",
          "required": [
            "status"
          ],
          "properties": {
            "raw_score": {
              "type": [
                "number",
                "null"
              ]
            },
            "normalized_score": {
              "type": [
                "number",
                "null"
              ]
            },
            "confidence": {
              "type": [
                "number",
                "null"
              ],
              "minimum": 0,
              "maximum": 1
            },
            "status": {
              "enum": [
                "MEASURED",
                "EXPERIMENTAL",
                "UNRESOLVED",
                "NOT_APPLICABLE"
              ]
            },
            "metric_version": {
              "type": [
                "string",
                "null"
              ]
            },
            "warnings": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        },
        "PG": {
          "type": "object",
          "required": [
            "status"
          ],
          "properties": {
            "raw_score": {
              "type": [
                "number",
                "null"
              ]
            },
            "normalized_score": {
              "type": [
                "number",
                "null"
              ]
            },
            "confidence": {
              "type": [
                "number",
                "null"
              ],
              "minimum": 0,
              "maximum": 1
            },
            "status": {
              "enum": [
                "MEASURED",
                "EXPERIMENTAL",
                "UNRESOLVED",
                "NOT_APPLICABLE"
              ]
            },
            "metric_version": {
              "type": [
                "string",
                "null"
              ]
            },
            "warnings": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        },
        "RP": {
          "type": "object",
          "required": [
            "status"
          ],
          "properties": {
            "raw_score": {
              "type": [
                "number",
                "null"
              ]
            },
            "normalized_score": {
              "type": [
                "number",
                "null"
              ]
            },
            "confidence": {
              "type": [
                "number",
                "null"
              ],
              "minimum": 0,
              "maximum": 1
            },
            "status": {
              "enum": [
                "MEASURED",
                "EXPERIMENTAL",
                "UNRESOLVED",
                "NOT_APPLICABLE"
              ]
            },
            "metric_version": {
              "type": [
                "string",
                "null"
              ]
            },
            "warnings": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        },
        "NC": {
          "type": "object",
          "required": [
            "status"
          ],
          "properties": {
            "raw_score": {
              "type": [
                "number",
                "null"
              ]
            },
            "normalized_score": {
              "type": [
                "number",
                "null"
              ]
            },
            "confidence": {
              "type": [
                "number",
                "null"
              ],
              "minimum": 0,
              "maximum": 1
            },
            "status": {
              "enum": [
                "MEASURED",
                "EXPERIMENTAL",
                "UNRESOLVED",
                "NOT_APPLICABLE"
              ]
            },
            "metric_version": {
              "type": [
                "string",
                "null"
              ]
            },
            "warnings": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "evidence_profile": {
      "type": "object",
      "required": [
        "C_time",
        "C_version",
        "C_prior",
        "C_baseline",
        "C_ind",
        "C_structure",
        "C_failure"
      ],
      "properties": {
        "C_time": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "C_version": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "C_prior": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "C_baseline": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "C_ind": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "C_structure": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "C_failure": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        }
      }
    },
    "failures": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "failure_type": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "source_ref": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "failure_type",
          "description"
        ]
      }
    },
    "frontier_status": {
      "enum": [
        "NORMAL",
        "UNCOMMON",
        "RARE",
        "EXTREME",
        "HISTORICAL_FRONTIER_CANDIDATE",
        "PERSISTENT_FRONTIER_CANDIDATE",
        "UNRESOLVED"
      ]
    },
    "time_layers": {
      "type": "object",
      "properties": {
        "historical_status": {
          "type": [
            "string",
            "null"
          ]
        },
        "current_status": {
          "type": [
            "string",
            "null"
          ]
        },
        "persistent_status": {
          "type": [
            "string",
            "null"
          ]
        },
        "artifact_persistence": {
          "type": [
            "string",
            "null"
          ]
        },
        "agent_persistence": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "governance": {
      "type": "object",
      "properties": {
        "anti_crown_compliant": {
          "type": "boolean"
        },
        "identity_inference_blocked": {
          "type": "boolean"
        },
        "global_person_rank_present": {
          "type": "boolean"
        },
        "evidence_visible": {
          "type": "boolean"
        },
        "failures_visible": {
          "type": "boolean"
        }
      }
    },
    "revision": {
      "type": "object",
      "properties": {
        "previous_audit_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "revision_reason": {
          "type": [
            "string",
            "null"
          ]
        },
        "revision_direction": {
          "enum": [
            "UP",
            "DOWN",
            "MIXED",
            "UNRESOLVED",
            "INITIAL"
          ]
        }
      }
    }
  },
  "additionalProperties": true
}
