=== META ===
{
  "id": "GTPX-AUDIT-MODEL",
  "title": "GTPX Audit Model",
  "version": "0.1.0",
  "status": "draft",
  "updated": "2026-04-25",
  "authority": "09_runtime/GTPX-AUDIT-MODEL.gtpx",
  "type": "runtime_audit",
  "project": "GTPX",
  "depends_on": [
    "09_runtime/GTPX-RUNTIME-MODEL.gtpx",
    "09_runtime/GTPX-PATCH-MODEL.gtpx",
    "07_validation/GTPX-VALIDATION-MODEL.gtpx"
  ]
}

=== DATA ===
{
  "purpose": "Defines how all actions, decisions, inputs, and outputs are recorded and traceable in GTPX.",

  "audit_definition": "Audit is a complete, deterministic, and reconstructible record of the entire execution flow, including input, validation, decisions, processing steps, and output.",

  "audit_policy": {
    "audit_is_mandatory": true,
    "all_steps_must_be_recorded": true,
    "audit_must_be_reconstructible": true,
    "audit_must_be_immutable_after_commit": true
  },

  "audit_scope": [
    "request_payload",
    "contract",
    "validation_results",
    "selected_agent",
    "execution_steps",
    "generated_response",
    "ack_status",
    "hash_verification",
    "patch_operations",
    "final_state"
  ],

  "audit_structure": {
    "required_fields": [
      "audit_id",
      "timestamp",
      "request_reference",
      "validation_summary",
      "execution_trace",
      "response_reference",
      "status",
      "hash_status"
    ]
  },

  "field_definitions": {
    "audit_id": "Unique identifier of the audit record.",
    "timestamp": "Time of execution.",
    "request_reference": "Reference to original request.",
    "validation_summary": "Summary of validation results.",
    "execution_trace": "Step-by-step execution log.",
    "response_reference": "Reference to generated response.",
    "status": "Final execution status.",
    "hash_status": "Result of hash verification."
  }
}

=== RULES ===
{
  "audit_id_must_be_unique": true,
  "audit_must_cover_full_execution": true,
  "audit_must_be_traceable": true,
  "audit_must_be_readable_and_machine_parsable": true,
  "audit_must_not_be_modified_after_commit": true,
  "missing_audit_is_invalid": true
}

=== STATUS ===
{
  "state": "draft",
  "open_questions": [
    "Confirm audit storage format (log vs structured DB).",
    "Confirm retention policy requirements."
  ],
  "next_step": "Create and populate 10_examples/EXAMPLE-WMS-PARCEL-NUMBER.gtpx."
}