{
  "$defs": {
    "conformityMessage": {
      "additionalProperties": true,
      "description": "A UCP checkout messages[] entry carrying a conformity code and the ACF extension fields. The base fields (type, code, severity, path, content) are UCP's own; only expected, actual, action, uncertain and requires_buyer_approval are added by this extension.",
      "properties": {
        "action": {
          "description": "Extension field. The fix to perform, from the spec's closed action vocabulary. Consumers must ignore actions they do not recognize and treat that entry as not auto-applicable.",
          "pattern": "^[a-z][a-z0-9_]*$",
          "type": "string"
        },
        "actual": {
          "description": "Extension field. The value found in the checkout as built. Omitted only where disclosure would be unsafe (see the spec's privacy rules); when omitted, disclosure must say why."
        },
        "code": {
          "description": "UCP message code, from this extension's vocabulary: com.provecart.conformity.<failure code>, one code per failing dimension (e.g. com.provecart.conformity.price_over_ceiling, com.provecart.conformity.item_indeterminate). Consumers must tolerate codes they do not recognize.",
          "pattern": "^com\\.provecart\\.conformity\\.[a-z0-9_]+$",
          "type": "string"
        },
        "content": {
          "description": "UCP field. Human-readable message text, generated from the same structured values the extension fields carry.",
          "type": "string"
        },
        "disclosure": {
          "enum": [
            "full",
            "withheld_privacy"
          ],
          "type": "string"
        },
        "expected": {
          "description": "Extension field. The value the instruction reference (the AP2 Intent Mandate, in UCP terms) requires. Same disclosure rule as actual."
        },
        "path": {
          "description": "UCP field. JSONPath to the field, line item or occurrence in the checkout object that the message concerns.",
          "type": "string"
        },
        "requires_buyer_approval": {
          "description": "Extension field. True when no repair within the buyer's existing authorization is available and proceeding requires a fresh buyer decision. The host's severity for such a message is requires_buyer_review in any case; this flag states the same rule at the level of the individual correction. An agent must never auto-apply an entry with this flag set; approval means a new or amended instruction reference, never a cleared flag.",
          "type": "boolean"
        },
        "severity": {
          "description": "UCP field. recoverable (a fix exists in band), requires_buyer_review (hand off to the buyer), or unrecoverable (no repair by editing the checkout).",
          "enum": [
            "recoverable",
            "requires_buyer_review",
            "unrecoverable"
          ],
          "type": "string"
        },
        "type": {
          "enum": [
            "error",
            "warning",
            "info"
          ],
          "type": "string"
        },
        "uncertain": {
          "description": "Extension field. True when the checker could not positively determine conformity (an indeterminate determination), false when the violation is positively established.",
          "type": "boolean"
        }
      },
      "required": [
        "type",
        "code",
        "severity",
        "content"
      ],
      "type": "object"
    },
    "conformityObject": {
      "additionalProperties": false,
      "description": "The single namespaced conformity object carried on the checkout, under the key com.provecart.conformity \u2014 one key, the way the AP2 extension nests under 'ap2', so canonicalization and signature exclusion have one rule.",
      "properties": {
        "evidence_url": {
          "description": "Where the sealed evidence record for this check can be retrieved by an authorized party. Public exports of a record are redacted per the spec's privacy rules; this URL is not a public dump of buyer data.",
          "type": "string"
        },
        "expires_at": {
          "description": "After this time the verdict must not be acted on; the checkout must be re-checked. A stale verdict presented for payment capture or ticket issuance must be refused.",
          "format": "date-time",
          "type": "string"
        },
        "issued_at": {
          "format": "date-time",
          "type": "string"
        },
        "mandate_ref": {
          "additionalProperties": false,
          "description": "Reference to the buyer's signed instructions \u2014 in UCP terms the AP2 Intent Mandate (dev.ucp.common.payment.ap2_mandate) \u2014 never the instructions themselves. The digest binds the verdict to the exact instruction version that was checked.",
          "properties": {
            "digest": {
              "minLength": 8,
              "type": "string"
            },
            "id": {
              "type": "string"
            },
            "scheme": {
              "description": "The signing scheme of the referenced instruction artifact, e.g. ap2, verifiable-intent, hmac-sha256. Informational; verification happens at check time.",
              "type": "string"
            }
          },
          "required": [
            "digest"
          ],
          "type": "object"
        },
        "max_attempts": {
          "description": "Suggested retry budget for the correction loop. Exhausting it is not a verdict; the agent stops and escalates.",
          "minimum": 1,
          "type": "integer"
        },
        "previous_record_id": {
          "description": "The record_id this submission supersedes, when the checkout is a corrected resubmission. Forms the attempt chain; earlier records are never rewritten. The reference implementation validates the link at intake (same API key, same mandate, chain head only) and enforces the retry budget of 3 attempts per chain; security verification closed 2026-11-04 (see the spec's retry section).",
          "type": [
            "string",
            "null"
          ]
        },
        "record_id": {
          "description": "Identifier of the sealed evidence record for this check. Also the idempotency anchor: a replayed check of the same checkout under the same instruction reference returns this same record_id.",
          "type": "string"
        },
        "subject_digest": {
          "description": "Canonical digest of the checkout as checked. Together with mandate_ref.digest it binds the verdict to exactly one checkout state and one instruction version; any change to either requires a new check.",
          "type": "string"
        },
        "verdict": {
          "enum": [
            "MATCH",
            "REVIEW",
            "BLOCK"
          ],
          "type": "string"
        },
        "verdict_token": {
          "description": "Short-lived signed token binding this verdict to its record. Single-use and hold-bound: it authorizes at most one downstream action (one payment capture, one ticket issuance) against exactly one record, verified against the hold record itself. Required when the object is presented to authorize a downstream action; may be elided in display or fixture contexts.",
          "type": "string"
        }
      },
      "required": [
        "verdict",
        "record_id",
        "mandate_ref",
        "subject_digest",
        "expires_at"
      ],
      "type": "object"
    }
  },
  "$id": "https://provecart.com/standards/acf-v0.2.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "license": "This JSON Schema and the specification text may be copied and shared freely, with attribution to ProveCart. The format is free to implement: ProveCart commits that any patent claim it owns or controls that is necessarily infringed by implementing the format as published — an essential claim — is licensed royalty-free to anyone, for the purpose of implementing the format (a RAND-Z style commitment). The commitment covers the format only; it does not license ProveCart's verification service, checker, certification exam, evidence store, or brand, and it does not extend to patent claims that are not essential to implementing the format. Full statement: Section 16 of the specification.",
  "description": "Normative schema for the Agent Correction Format (ACF) v0.2, reshaped onto UCP checkout primitives per agent-correction-format-v0.2.md: a com.provecart.conformity code vocabulary for the host's messages[] array (with expected/actual/action as extension fields on a message) plus one namespaced conformity object on the checkout. Vendor-agnostic in substance: any conforming checker may emit these shapes; nothing in conformance requires a specific vendor's API, scoreboard, or credential issuer. The publisher's namespace appears in the code vocabulary and object key because a vendor extension is self-hosted under its publisher's namespace during the discussion phase.",
  "title": "Agent Correction Format (ACF) v0.2 \u2014 conformity corrections on UCP checkout messages",
  "type": "object"
}