{
  "specVersion": "0.2.0-draft",
  "id": "https://example.invalid/packs/contractor-order",
  "version": "0.1.0",
  "title": "Contractor order evidence readiness",
  "description": "Synthetic demonstration. This fictional gate does not reserve stock, grant credit, dispatch a vehicle or promise a delivery. The 10% discount limit is invented and does not represent Ewing policy.",
  "decision": {
    "intent": "Is this contractor order ready for a branch owner to review? Reconcile matching source records and identify the next accountable owner.",
    "question": "Is this contractor order ready for a branch owner to review?"
  },
  "applicability": {
    "op": "all",
    "conditions": [
      {
        "op": "fact",
        "path": "/review/context",
        "operator": "equals",
        "value": "synthetic-demo"
      },
      {
        "op": "fact",
        "path": "/review/purpose",
        "operator": "equals",
        "value": "order-commitment-review"
      }
    ]
  },
  "evidenceRequirements": [
    {
      "id": "quote-record",
      "description": "Contractor quote and pricing record matching orderId, quoteRevision, fulfillmentScope.",
      "required": true,
      "kind": "document"
    },
    {
      "id": "inventory-record",
      "description": "Stock allocation check matching orderId, quoteRevision, fulfillmentScope.",
      "required": true,
      "kind": "document"
    },
    {
      "id": "credit-record",
      "description": "Credit authorization record matching orderId, quoteRevision, fulfillmentScope.",
      "required": true,
      "kind": "document"
    },
    {
      "id": "delivery-record",
      "description": "Delivery slot and site check matching orderId, quoteRevision, fulfillmentScope.",
      "required": true,
      "kind": "document"
    }
  ],
  "sources": [
    {
      "id": "demo-policy",
      "title": "Contractor order evidence readiness — fictional policy v0.1.0",
      "publisher": "Judgment Pack demo",
      "locator": {
        "kind": "path",
        "value": "sources/policy/demo-policy.md"
      },
      "citation": {
        "location": "Decision gate",
        "excerpt": "Each record must match the submitted case, revision and scope. Missing or mismatched evidence cannot establish readiness. Positive results require accountable human review."
      },
      "rights": "Original synthetic example; no employer or customer policy is represented."
    }
  ],
  "outcomes": [
    {
      "id": "ready",
      "label": "Ready for branch review",
      "description": "Ready for branch review under the fictional evidence gate; no external action is authorized."
    },
    {
      "id": "review",
      "label": "Discount exception review",
      "description": "Discount exception review under the fictional evidence gate; no external action is authorized."
    },
    {
      "id": "hold",
      "label": "Hold the order commitment",
      "description": "Hold the order commitment under the fictional evidence gate; no external action is authorized."
    }
  ],
  "rules": [
    {
      "id": "ready",
      "description": "Matching positive records within this demo threshold",
      "when": {
        "op": "all",
        "conditions": [
          {
            "op": "all",
            "conditions": [
              {
                "op": "fact",
                "path": "/quote/customerAccepted",
                "operator": "equals",
                "value": true
              },
              {
                "op": "fact",
                "path": "/inventory/allocated",
                "operator": "equals",
                "value": true
              },
              {
                "op": "fact",
                "path": "/credit/approved",
                "operator": "equals",
                "value": true
              },
              {
                "op": "fact",
                "path": "/delivery/confirmed",
                "operator": "equals",
                "value": true
              }
            ]
          },
          {
            "op": "all",
            "conditions": [
              {
                "op": "fact",
                "path": "/quote/discountPercent",
                "operator": "greater-than-or-equal",
                "value": "0"
              },
              {
                "op": "fact",
                "path": "/quote/discountPercent",
                "operator": "less-than-or-equal",
                "value": "100"
              }
            ]
          },
          {
            "op": "fact",
            "path": "/credit/exceptionRequested",
            "operator": "equals",
            "value": false
          },
          {
            "op": "fact",
            "path": "/quote/discountPercent",
            "operator": "less-than-or-equal",
            "value": "10"
          }
        ]
      },
      "outcome": "ready",
      "onUnknown": "escalate",
      "sourceRefs": [
        "demo-policy"
      ],
      "evidenceRequirementRefs": [
        "quote-record",
        "inventory-record",
        "credit-record",
        "delivery-record"
      ],
      "rationale": "Matching positive records within this demo threshold. This is a fictional policy; the named owner remains accountable."
    },
    {
      "id": "review-boundary",
      "description": "Complete records requiring additional owner review",
      "when": {
        "op": "all",
        "conditions": [
          {
            "op": "all",
            "conditions": [
              {
                "op": "fact",
                "path": "/quote/customerAccepted",
                "operator": "equals",
                "value": true
              },
              {
                "op": "fact",
                "path": "/inventory/allocated",
                "operator": "equals",
                "value": true
              },
              {
                "op": "fact",
                "path": "/credit/approved",
                "operator": "equals",
                "value": true
              },
              {
                "op": "fact",
                "path": "/delivery/confirmed",
                "operator": "equals",
                "value": true
              }
            ]
          },
          {
            "op": "all",
            "conditions": [
              {
                "op": "fact",
                "path": "/quote/discountPercent",
                "operator": "greater-than-or-equal",
                "value": "0"
              },
              {
                "op": "fact",
                "path": "/quote/discountPercent",
                "operator": "less-than-or-equal",
                "value": "100"
              }
            ]
          },
          {
            "op": "fact",
            "path": "/credit/exceptionRequested",
            "operator": "equals",
            "value": false
          },
          {
            "op": "fact",
            "path": "/quote/discountPercent",
            "operator": "greater-than",
            "value": "10"
          }
        ]
      },
      "outcome": "review",
      "onUnknown": "escalate",
      "sourceRefs": [
        "demo-policy"
      ],
      "evidenceRequirementRefs": [
        "quote-record",
        "inventory-record",
        "credit-record",
        "delivery-record"
      ],
      "rationale": "Complete records requiring additional owner review. This is a fictional policy; the named owner remains accountable."
    },
    {
      "id": "known-blocker",
      "description": "A recorded prerequisite is explicitly false",
      "when": {
        "op": "any",
        "conditions": [
          {
            "op": "fact",
            "path": "/quote/customerAccepted",
            "operator": "equals",
            "value": false
          },
          {
            "op": "fact",
            "path": "/inventory/allocated",
            "operator": "equals",
            "value": false
          },
          {
            "op": "fact",
            "path": "/credit/approved",
            "operator": "equals",
            "value": false
          },
          {
            "op": "fact",
            "path": "/delivery/confirmed",
            "operator": "equals",
            "value": false
          }
        ]
      },
      "outcome": "hold",
      "onUnknown": "escalate",
      "sourceRefs": [
        "demo-policy"
      ],
      "evidenceRequirementRefs": [
        "quote-record",
        "inventory-record",
        "credit-record",
        "delivery-record"
      ],
      "rationale": "A recorded prerequisite is explicitly false. This is a fictional policy; the named owner remains accountable."
    }
  ],
  "exceptions": [
    {
      "id": "human-exception",
      "description": "Explicit exception requires owner review before ordinary outcome resolution.",
      "when": {
        "op": "fact",
        "path": "/credit/exceptionRequested",
        "operator": "equals",
        "value": true
      },
      "effect": "escalate",
      "onUnknown": "escalate",
      "sourceRefs": [
        "demo-policy"
      ]
    }
  ],
  "fallbackOutcome": "hold",
  "escalation": {
    "triggers": [
      "not-applicable",
      "missing-required-evidence",
      "unknown"
    ],
    "target": {
      "kind": "human-role",
      "name": "Branch operations owner"
    },
    "message": "The Branch operations owner coordinates the source owner. Inspect the acquisition diagnosis and retain this run before correcting inputs. No notification has been sent."
  },
  "metadata": {
    "authors": [
      "Codex — synthetic demo prepared for the maintainer"
    ],
    "createdAt": "2026-09-28T18:26:06.719035Z",
    "license": "Apache-2.0"
  }
}
