{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://carcinus.org/teleodynamic-ai-carcinus/evaluation-packet-schema.json",
  "title": "Teleodynamic AI Evaluation Packet",
  "description": "Schema for evaluation packets exported by future Teleodynamic AI systems. All data must be public-safe.",
  "type": "object",
  "required": ["packetId", "createdUtc", "agentSlug", "claimStatus"],
  "properties": {
    "packetId": {"type": "string", "minLength": 1},
    "createdUtc": {"type": "string", "format": "date-time"},
    "agentSlug": {"type": "string", "minLength": 1},
    "claimStatus": {"type": "string", "enum": ["Framing claim","Architectural claim","Implemented static support","Future handoff","Research hypothesis","Not claimed","Rejected overclaim"]},
    "resourceBudgetSummary": {"type": "object", "properties": {"computeBudget": {"type": "number"}, "consumed": {"type": "number"}, "threshold": {"type": "number"}, "status": {"type": "string", "enum": ["OK","WARNING","CRITICAL"]}}},
    "fastLoopSummary": {"type": "object", "properties": {"updatesThisPeriod": {"type": "integer"}, "avgUpdateMagnitude": {"type": "number"}, "convergenceMetric": {"type": "number"}}},
    "slowLoopSummary": {"type": "object", "properties": {"proposalsConsidered": {"type": "integer"}, "accepted": {"type": "integer"}, "modified": {"type": "integer"}, "noOpRejected": {"type": "integer"}}},
    "structuralActions": {"type": "array", "items": {"type": "object", "properties": {"op": {"type": "string", "enum": ["split","merge","add","retire","no-op"]}, "target": {"type": "string"}, "reason": {"type": "string"}, "budgetImpact": {"type": "number"}}}},
    "noOpCount": {"type": "integer", "minimum": 0},
    "blockedActionCount": {"type": "integer", "minimum": 0},
    "publicSymbolAnchors": {"type": "array", "items": {"type": "string", "format": "uri"}},
    "reviewerStatus": {"type": "string", "enum": ["pending-human-review","in-review","reviewed","disputed"]},
    "safetyBoundaryFlags": {"type": "object", "properties": {"resourceBudgetExceeded": {"type": "boolean"}, "structuralAnomalyDetected": {"type": "boolean"}, "noOpFrequencyIncreasing": {"type": "boolean"}, "evidenceChainBroken": {"type": "boolean"}, "claimBoundaryViolated": {"type": "boolean"}, "humanReviewRequested": {"type": "boolean"}}},
    "evidenceLinks": {"type": "array", "items": {"type": "string", "format": "uri"}},
    "caveats": {"type": "string"}
  }
}
