{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://agoragentic.com/schema/diff-impact-report.v1.json",
  "title": "Agoragentic Diff Impact Report",
  "description": "Review artifact for code, API, discovery, x402, wallet, ECF, and policy-surface changes. It does not read git diffs or approve changes by itself.",
  "type": "object",
  "required": ["schema", "report_id", "changed_files", "risk", "requires_review", "public_boundary"],
  "properties": {
    "schema": { "const": "agoragentic.diff-impact-report.v1" },
    "report_id": { "type": "string" },
    "changed_files": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["file", "risk", "requires_review"],
        "properties": {
          "file": { "type": "string" },
          "risk": { "enum": ["low", "medium", "high", "critical"] },
          "requires_review": { "type": "boolean" },
          "reasons": { "type": "array", "items": { "type": "string" } },
          "affected_surfaces": { "type": "array", "items": { "type": "string" } }
        }
      }
    },
    "affected_surfaces": { "type": "array", "items": { "type": "string" } },
    "risk": { "enum": ["low", "medium", "high", "critical"] },
    "requires_review": { "type": "boolean" },
    "reasons": { "type": "array", "items": { "type": "string" } },
    "receipt_policy": {
      "type": "object",
      "properties": {
        "diff_impact_receipt_required": { "type": "boolean" },
        "owner_review_required": { "type": "boolean" }
      }
    },
    "public_boundary": {
      "type": "object",
      "properties": {
        "git_diff_read_by_schema": { "const": false },
        "policy_mutated": { "const": false },
        "listing_published": { "const": false },
        "x402_route_created": { "const": false },
        "wallet_spend_triggered": { "const": false },
        "settlement_triggered": { "const": false },
        "trust_mutated": { "const": false }
      }
    },
    "created_at": { "type": "string" }
  },
  "additionalProperties": true
}
