{
  "specification": "SAQ Execution Contract Specification",
  "version": "0.1",
  "document_id": "SAQ-ECS-0.1-20260723",
  "code_format": "UPPER_SNAKE_CASE",
  "codes": [
    {
      "code": "CONTRACT_MALFORMED",
      "category": "CONTRACT",
      "severity": "ERROR",
      "default_disposition": "DENY",
      "message": "The contract is missing required structure or contains invalid values.",
      "remediation": "Correct the contract and resubmit it for validation.",
      "retryable": true,
      "terminal": false
    },
    {
      "code": "CONTRACT_EXPIRED",
      "category": "CONTRACT",
      "severity": "ERROR",
      "default_disposition": "EXPIRE",
      "message": "The contract validity window has expired.",
      "remediation": "Assemble a new contract revision with current authority, evidence, state, and policy.",
      "retryable": true,
      "terminal": true
    },
    {
      "code": "CONTRACT_DIGEST_MISMATCH",
      "category": "CONTRACT",
      "severity": "CRITICAL",
      "default_disposition": "DENY",
      "message": "The supplied contract digest does not match the material contract contents.",
      "remediation": "Reject the contract, preserve evidence, and reassemble from trusted sources.",
      "retryable": false,
      "terminal": true
    },
    {
      "code": "ACTION_MUTATED_AFTER_DECISION",
      "category": "CONTRACT",
      "severity": "CRITICAL",
      "default_disposition": "DENY",
      "message": "The proposed action changed after admissibility was decided.",
      "remediation": "Invalidate the decision and grant, then perform a new evaluation.",
      "retryable": true,
      "terminal": true
    },
    {
      "code": "TRANSITION_FORBIDDEN",
      "category": "CONTRACT",
      "severity": "CRITICAL",
      "default_disposition": "DENY",
      "message": "The requested lifecycle transition is not permitted.",
      "remediation": "Return to a valid lifecycle state and record a new transition event.",
      "retryable": false,
      "terminal": true
    },
    {
      "code": "DENIED_DECISION_CANNOT_EXECUTE",
      "category": "CONTRACT",
      "severity": "CRITICAL",
      "default_disposition": "DENY",
      "message": "A denied contract cannot transition into execution.",
      "remediation": "Create a remediated contract revision and obtain a new admissibility decision.",
      "retryable": true,
      "terminal": true
    },
    {
      "code": "EXPIRED_CONTRACT_CANNOT_EXECUTE",
      "category": "CONTRACT",
      "severity": "CRITICAL",
      "default_disposition": "EXPIRE",
      "message": "An expired contract cannot transition into execution.",
      "remediation": "Reassemble and revalidate the contract.",
      "retryable": true,
      "terminal": true
    },
    {
      "code": "IDENTITY_UNRESOLVED",
      "category": "IDENTITY",
      "severity": "ERROR",
      "default_disposition": "DEFER",
      "message": "The requester, actor, or authority subject cannot be resolved.",
      "remediation": "Resolve authoritative identities before continuing.",
      "retryable": true,
      "terminal": false
    },
    {
      "code": "IDENTITY_AUTHORITY_SUBJECT_MISMATCH",
      "category": "IDENTITY",
      "severity": "CRITICAL",
      "default_disposition": "DENY",
      "message": "The actor is not validly bound to the authority subject for this action.",
      "remediation": "Correct the identity binding or obtain valid delegated authority.",
      "retryable": true,
      "terminal": true
    },
    {
      "code": "AUTHORITY_MISSING",
      "category": "AUTHORITY",
      "severity": "CRITICAL",
      "default_disposition": "DENY",
      "message": "No external authority claim supports the proposed consequential action.",
      "remediation": "Provide an attributable authority claim from an approved source.",
      "retryable": true,
      "terminal": true
    },
    {
      "code": "AUTHORITY_SCOPE_INSUFFICIENT",
      "category": "AUTHORITY",
      "severity": "CRITICAL",
      "default_disposition": "DENY",
      "message": "The authority scope does not permit the proposed action.",
      "remediation": "Reduce the action scope or obtain appropriate authority.",
      "retryable": true,
      "terminal": true
    },
    {
      "code": "AUTHORITY_EXPIRED",
      "category": "AUTHORITY",
      "severity": "CRITICAL",
      "default_disposition": "DENY",
      "message": "The authority claim expired before the decision or execution time.",
      "remediation": "Obtain and validate a current authority claim.",
      "retryable": true,
      "terminal": true
    },
    {
      "code": "AUTHORITY_REVOKED",
      "category": "AUTHORITY",
      "severity": "CRITICAL",
      "default_disposition": "REVOKE",
      "message": "The authority claim has been revoked.",
      "remediation": "Invalidate dependent decisions and grants and stop execution.",
      "retryable": false,
      "terminal": true
    },
    {
      "code": "AUTHORITY_SUSPENDED",
      "category": "AUTHORITY",
      "severity": "ERROR",
      "default_disposition": "DEFER",
      "message": "The authority claim is temporarily suspended.",
      "remediation": "Wait for authoritative reinstatement or escalate.",
      "retryable": true,
      "terminal": false
    },
    {
      "code": "DELEGATION_CHAIN_INVALID",
      "category": "AUTHORITY",
      "severity": "CRITICAL",
      "default_disposition": "DENY",
      "message": "The delegation chain is incomplete, unverifiable, or violates depth rules.",
      "remediation": "Repair and revalidate the delegation chain.",
      "retryable": true,
      "terminal": true
    },
    {
      "code": "DELEGATION_SCOPE_WIDENED",
      "category": "AUTHORITY",
      "severity": "CRITICAL",
      "default_disposition": "DENY",
      "message": "A delegation hop widened authority beyond the delegator scope.",
      "remediation": "Reduce delegated scope to a subset of the upstream authority.",
      "retryable": false,
      "terminal": true
    },
    {
      "code": "STATE_UNAVAILABLE",
      "category": "STATE",
      "severity": "ERROR",
      "default_disposition": "DEFER",
      "message": "Authoritative current state could not be retrieved.",
      "remediation": "Retry the authoritative source or escalate according to domain policy.",
      "retryable": true,
      "terminal": false
    },
    {
      "code": "STATE_INVALID",
      "category": "STATE",
      "severity": "CRITICAL",
      "default_disposition": "DENY",
      "message": "The authoritative state source reports an invalid or prohibited state.",
      "remediation": "Do not execute; remediate the underlying state or change the action.",
      "retryable": true,
      "terminal": true
    },
    {
      "code": "STATE_STALE",
      "category": "STATE",
      "severity": "ERROR",
      "default_disposition": "DEFER",
      "message": "The current-state snapshot exceeds the permitted freshness window.",
      "remediation": "Refresh authoritative state and perform a new decision.",
      "retryable": true,
      "terminal": false
    },
    {
      "code": "STATE_CONFLICTING",
      "category": "STATE",
      "severity": "CRITICAL",
      "default_disposition": "ESCALATE",
      "message": "Authoritative state sources conflict.",
      "remediation": "Resolve the conflict through a designated authority before execution.",
      "retryable": true,
      "terminal": false
    },
    {
      "code": "STATE_CHANGED_AFTER_DECISION",
      "category": "STATE",
      "severity": "CRITICAL",
      "default_disposition": "DENY",
      "message": "Authoritative state changed after admissibility was decided.",
      "remediation": "Invalidate the prior decision and re-evaluate against current state.",
      "retryable": true,
      "terminal": true
    },
    {
      "code": "EVIDENCE_MISSING",
      "category": "EVIDENCE",
      "severity": "ERROR",
      "default_disposition": "DEFER",
      "message": "Required evidence is missing.",
      "remediation": "Retrieve and validate the required evidence.",
      "retryable": true,
      "terminal": false
    },
    {
      "code": "EVIDENCE_STALE",
      "category": "EVIDENCE",
      "severity": "ERROR",
      "default_disposition": "DEFER",
      "message": "Evidence exceeds its permitted freshness window.",
      "remediation": "Refresh the evidence and perform a new decision.",
      "retryable": true,
      "terminal": false
    },
    {
      "code": "EVIDENCE_PROVENANCE_INVALID",
      "category": "EVIDENCE",
      "severity": "CRITICAL",
      "default_disposition": "DENY",
      "message": "Evidence provenance cannot be validated.",
      "remediation": "Replace the evidence with attributable evidence from an approved source.",
      "retryable": true,
      "terminal": true
    },
    {
      "code": "EVIDENCE_INVALID",
      "category": "EVIDENCE",
      "severity": "CRITICAL",
      "default_disposition": "DENY",
      "message": "Evidence validation failed.",
      "remediation": "Correct or replace the evidence and re-evaluate.",
      "retryable": true,
      "terminal": true
    },
    {
      "code": "EVIDENCE_CONFLICT",
      "category": "EVIDENCE",
      "severity": "CRITICAL",
      "default_disposition": "ESCALATE",
      "message": "Required evidence conflicts materially.",
      "remediation": "Resolve the conflict through a designated authority.",
      "retryable": true,
      "terminal": false
    },
    {
      "code": "POLICY_MISSING",
      "category": "POLICY",
      "severity": "CRITICAL",
      "default_disposition": "DEFER",
      "message": "No explicit policy binding applies to the proposed action.",
      "remediation": "Resolve and bind the applicable policy and version.",
      "retryable": true,
      "terminal": false
    },
    {
      "code": "POLICY_VERSION_MISMATCH",
      "category": "POLICY",
      "severity": "CRITICAL",
      "default_disposition": "DENY",
      "message": "The evaluated policy version does not match the bound policy digest.",
      "remediation": "Reload the correct policy and repeat admissibility evaluation.",
      "retryable": true,
      "terminal": true
    },
    {
      "code": "POLICY_PROHIBITS_ACTION",
      "category": "POLICY",
      "severity": "CRITICAL",
      "default_disposition": "DENY",
      "message": "The applicable policy prohibits the proposed action.",
      "remediation": "Do not execute unless a separately authorized policy change occurs.",
      "retryable": false,
      "terminal": true
    },
    {
      "code": "JURISDICTION_UNSUPPORTED",
      "category": "POLICY",
      "severity": "ERROR",
      "default_disposition": "DENY",
      "message": "The policy or domain profile does not authorize execution in the target jurisdiction.",
      "remediation": "Select an authorized jurisdiction or obtain an approved domain profile.",
      "retryable": true,
      "terminal": true
    },
    {
      "code": "RISK_THRESHOLD_EXCEEDED",
      "category": "RISK",
      "severity": "CRITICAL",
      "default_disposition": "ESCALATE",
      "message": "The action exceeds the automated risk or consequence threshold.",
      "remediation": "Escalate with the complete contract to the designated authority.",
      "retryable": true,
      "terminal": false
    },
    {
      "code": "CONSTRAINT_VIOLATION",
      "category": "CONSTRAINT",
      "severity": "CRITICAL",
      "default_disposition": "DENY",
      "message": "The proposed or realized action violates a machine-verifiable constraint.",
      "remediation": "Reduce the action to the permitted limits or obtain a new decision.",
      "retryable": true,
      "terminal": true
    },
    {
      "code": "APPROVAL_REQUIRED",
      "category": "CONSTRAINT",
      "severity": "ERROR",
      "default_disposition": "CONDITION",
      "message": "One or more required approvals have not been bound to the contract.",
      "remediation": "Add attributable approval evidence and revalidate.",
      "retryable": true,
      "terminal": false
    },
    {
      "code": "TARGET_PROHIBITED",
      "category": "CONSTRAINT",
      "severity": "CRITICAL",
      "default_disposition": "DENY",
      "message": "The target is outside the permitted scope.",
      "remediation": "Select a permitted target or obtain new authority and policy approval.",
      "retryable": true,
      "terminal": true
    },
    {
      "code": "TOOL_NOT_PERMITTED",
      "category": "CONSTRAINT",
      "severity": "CRITICAL",
      "default_disposition": "DENY",
      "message": "The executor or agent attempted to use a tool outside the permitted set.",
      "remediation": "Use a permitted tool or obtain a new constrained grant.",
      "retryable": true,
      "terminal": true
    },
    {
      "code": "ADMISSIBILITY_DECISION_MISSING",
      "category": "ADMISSIBILITY",
      "severity": "CRITICAL",
      "default_disposition": "DENY",
      "message": "No attributable admissibility decision exists.",
      "remediation": "Run the complete admissibility evaluation before grant issuance.",
      "retryable": true,
      "terminal": true
    },
    {
      "code": "GRANT_MISSING",
      "category": "GRANT",
      "severity": "CRITICAL",
      "default_disposition": "DENY",
      "message": "No execution grant is present.",
      "remediation": "Issue a narrow grant from a current admissible contract.",
      "retryable": true,
      "terminal": true
    },
    {
      "code": "GRANT_EXPIRED",
      "category": "GRANT",
      "severity": "CRITICAL",
      "default_disposition": "EXPIRE",
      "message": "The execution grant is outside its validity window.",
      "remediation": "Issue a new grant after revalidation.",
      "retryable": true,
      "terminal": true
    },
    {
      "code": "GRANT_REVOKED",
      "category": "GRANT",
      "severity": "CRITICAL",
      "default_disposition": "REVOKE",
      "message": "The execution grant was revoked.",
      "remediation": "Stop execution and create a new contract if the action remains necessary.",
      "retryable": false,
      "terminal": true
    },
    {
      "code": "REVOKED_GRANT_CANNOT_EXECUTE",
      "category": "GRANT",
      "severity": "CRITICAL",
      "default_disposition": "REVOKE",
      "message": "A revoked grant cannot cross the execution boundary.",
      "remediation": "Stop execution and preserve the attempted transition as evidence.",
      "retryable": false,
      "terminal": true
    },
    {
      "code": "GRANT_REPLAY_DETECTED",
      "category": "GRANT",
      "severity": "CRITICAL",
      "default_disposition": "DENY",
      "message": "The grant nonce or use limit indicates a replay attempt.",
      "remediation": "Reject execution and investigate the replay source.",
      "retryable": false,
      "terminal": true
    },
    {
      "code": "GRANT_ACTION_MISMATCH",
      "category": "GRANT",
      "severity": "CRITICAL",
      "default_disposition": "DENY",
      "message": "The proposed executor action does not match the granted action digest.",
      "remediation": "Reject execution and obtain a new decision for the changed action.",
      "retryable": true,
      "terminal": true
    },
    {
      "code": "GRANT_TARGET_MISMATCH",
      "category": "GRANT",
      "severity": "CRITICAL",
      "default_disposition": "DENY",
      "message": "The executor target does not match the target bound to the grant.",
      "remediation": "Reject execution and obtain a new contract for the changed target.",
      "retryable": true,
      "terminal": true
    },
    {
      "code": "GRANT_CONTRACT_MISMATCH",
      "category": "GRANT",
      "severity": "CRITICAL",
      "default_disposition": "DENY",
      "message": "The grant is not bound to the current contract digest.",
      "remediation": "Reject the grant and issue a correctly bound grant.",
      "retryable": true,
      "terminal": true
    },
    {
      "code": "GRANT_USE_LIMIT_EXCEEDED",
      "category": "GRANT",
      "severity": "CRITICAL",
      "default_disposition": "DENY",
      "message": "The grant use limit has been exhausted.",
      "remediation": "Issue a new grant after revalidation.",
      "retryable": true,
      "terminal": true
    },
    {
      "code": "EXECUTOR_VERIFICATION_REQUIRED",
      "category": "EXECUTION",
      "severity": "CRITICAL",
      "default_disposition": "DENY",
      "message": "The executor has not verified the grant at the execution boundary.",
      "remediation": "Perform grant, action, target, time, revocation, and replay verification.",
      "retryable": true,
      "terminal": true
    },
    {
      "code": "EXECUTION_VARIANCE_DETECTED",
      "category": "EXECUTION",
      "severity": "CRITICAL",
      "default_disposition": "CORRECT",
      "message": "The realized action differs from the authorized action.",
      "remediation": "Stop continuation and initiate reversal, compensation, remediation, or escalation.",
      "retryable": false,
      "terminal": true
    },
    {
      "code": "EXECUTION_FAILED",
      "category": "EXECUTION",
      "severity": "ERROR",
      "default_disposition": "FAIL",
      "message": "The executor failed to complete the authorized action.",
      "remediation": "Write a failure receipt and follow the domain correction path.",
      "retryable": true,
      "terminal": false
    },
    {
      "code": "RECEIPT_REQUIRED_BEFORE_CLOSURE",
      "category": "RECEIPT",
      "severity": "CRITICAL",
      "default_disposition": "DENY",
      "message": "The contract cannot close before a complete receipt is recorded.",
      "remediation": "Write and validate the execution or failure receipt.",
      "retryable": true,
      "terminal": true
    },
    {
      "code": "RECEIPT_MISSING_EXECUTOR",
      "category": "RECEIPT",
      "severity": "CRITICAL",
      "default_disposition": "DENY",
      "message": "The receipt does not identify the executor.",
      "remediation": "Reject the receipt and reconstruct it from authoritative execution telemetry.",
      "retryable": true,
      "terminal": true
    },
    {
      "code": "RECEIPT_DIGEST_MISMATCH",
      "category": "RECEIPT",
      "severity": "CRITICAL",
      "default_disposition": "DENY",
      "message": "The receipt digest or bound contract/grant digest is inconsistent.",
      "remediation": "Reject the receipt and investigate possible mutation or corruption.",
      "retryable": false,
      "terminal": true
    },
    {
      "code": "CORRECTION_REQUIRED",
      "category": "CORRECTION",
      "severity": "CRITICAL",
      "default_disposition": "CORRECT",
      "message": "Authoritative reality requires correction of an executed or pending action.",
      "remediation": "Invoke the domain correction path and preserve the complete execution worldline.",
      "retryable": false,
      "terminal": false
    },
    {
      "code": "CORRECTION_AUTHORITY_MISSING",
      "category": "CORRECTION",
      "severity": "CRITICAL",
      "default_disposition": "ESCALATE",
      "message": "No valid authority exists to perform the required correction.",
      "remediation": "Escalate to the designated external authority.",
      "retryable": true,
      "terminal": false
    },
    {
      "code": "SYSTEM_VALIDATION_ERROR",
      "category": "SYSTEM",
      "severity": "CRITICAL",
      "default_disposition": "FAIL",
      "message": "The validation mechanism encountered an internal error.",
      "remediation": "Fail closed, preserve evidence, and retry or escalate.",
      "retryable": true,
      "terminal": false
    }
  ]
}
