Research preview · 0.1.0-draft

No compatibility guarantee. Not for consequential production decisions.

Synthetic example View tagged source

Expense approval

Research example for deciding whether an employee expense may be automatically approved.

Synthetic example: This document is for schema and authoring tests. It is not a policy, authorization, or instruction to perform an external action.
Pack ID
https://example.com/judgment-packs/expense-approval
Pack version
0.1.0
Outcomes
3
Rules
3

Download raw JSON

Guide to this example

Focus: Cross-feature authoring and local-reference tracing.

The checked-in document is expected to pass JPS carrier, structural, and semantic document checks. The edge and failure notes below are inspection prompts or scratch-copy exercises; they do not assert a portable evaluator result.

What this example demonstrates

A fuller JPS document with applicability, two evidence requirements, a cited source, three outcomes and rules, an exception, a fallback, and explicit escalation metadata.

Good for

  • Tracing outcome, evidence, and source IDs from declarations to every local reference.
  • Inspecting nested all/not conditions and the boundary between schema checks and semantic checks.
  • Reviewing how one synthetic pack records applicability, exceptions, fallback, and human-handoff configuration.

Edges to inspect

  • The declared amount split includes 5000 in the less-than-or-equal branch and values above 5000 in the review branch. Ordered decimal evaluation is still informative in this draft, so this is not a portable execution test.
  • In the informative model, an active-investigation forced outcome bypasses normal rules. Separately, a prohibited category plus an amount above 5000 can produce conflicting normal-rule candidates. Neither behavior is a portable evaluator result.
  • If activeInvestigation is absent, its exception is unknown and declares escalation in the informative model. Missing required evidence also requests handoff, while a non-employee-expense value is not applicable.
  • If resolution otherwise completes with no matching rule, the declared manual-review fallback applies. The listed no-match escalation trigger is unreachable in the informative algorithm while that fallback exists.

Failure paths

  • In a scratch copy, remove an outcome or evidence declaration while leaving a reference to it; the document can retain a valid JSON shape but must fail semantic document conformance.
  • Add an unknown root member to produce a structural failure, or duplicate a JSON member to produce a carrier failure before schema validation.
  • Never treat an illustrative approve, reject, or review label as authorization to process a real expense.
Keep the layers separate. A malformed carrier, a schema-shape failure, and a dangling local reference fail at different document-conformance layers. Missing evidence, unknown facts, conflicts, and no-match handling belong to the informative resolution experiment because JPS 0.1.0-draft defines no evaluator conformance class.

Annotated document

The complete validated pack. Each highlighted key links to its definition on the right — click a key to see what it means and its allowed values.

{
  "specVersion": "0.1.0-draft",
  "id": "https://example.com/judgment-packs/expense-approval",
  "version": "0.1.0",
  "title": "Expense approval",
  "description": "Research example for deciding whether an employee expense may be automatically approved.",
  "decision": {
    "intent": "Determine whether an employee expense may be automatically approved, rejected, or sent to a human reviewer.",
    "question": "What approval path should this expense follow?"
  },
  "applicability": {
    "op": "fact",
    "path": "/expense/type",
    "operator": "equals",
    "value": "employee-expense"
  },
  "evidenceRequirements": [
    {
      "id": "receipt",
      "description": "An itemized receipt for the expense.",
      "required": true,
      "kind": "document"
    },
    {
      "id": "cost-center",
      "description": "A valid cost-center identifier.",
      "required": true,
      "kind": "fact"
    }
  ],
  "sources": [
    {
      "id": "expense-policy",
      "title": "Example expense policy",
      "publisher": "Example Corporation",
      "publishedAt": "2026-01-15",
      "locator": {
        "kind": "uri",
        "value": "https://example.com/policies/expenses"
      },
      "citation": {
        "location": "Section 4 \u2014 approval thresholds",
        "excerpt": "Expenses above 5000 require finance review. Prohibited categories must be rejected."
      },
      "rights": "Example content; not an operational policy."
    }
  ],
  "outcomes": [
    {
      "id": "approve",
      "label": "Approve",
      "description": "The evidence and declared rules support automatic approval."
    },
    {
      "id": "manual-review",
      "label": "Manual review",
      "description": "An accountable finance reviewer must decide."
    },
    {
      "id": "reject",
      "label": "Reject",
      "description": "The expense falls in a prohibited category."
    }
  ],
  "rules": [
    {
      "id": "prohibited-category",
      "description": "Reject expenses in a prohibited category.",
      "when": {
        "op": "fact",
        "path": "/expense/category",
        "operator": "in",
        "value": [
          "personal",
          "cash-equivalent"
        ]
      },
      "outcome": "reject",
      "onUnknown": "escalate",
      "evidenceRequirementRefs": [
        "receipt",
        "cost-center"
      ],
      "sourceRefs": [
        "expense-policy"
      ],
      "rationale": "The example policy prohibits these categories."
    },
    {
      "id": "large-expense",
      "description": "Send expenses above the declared threshold to finance review.",
      "when": {
        "op": "fact",
        "path": "/expense/amount",
        "operator": "greater-than",
        "value": "5000"
      },
      "outcome": "manual-review",
      "onUnknown": "escalate",
      "evidenceRequirementRefs": [
        "receipt",
        "cost-center"
      ],
      "sourceRefs": [
        "expense-policy"
      ],
      "rationale": "The example policy requires finance review above 5000."
    },
    {
      "id": "ordinary-expense",
      "description": "Approve a supported ordinary expense at or below the threshold.",
      "when": {
        "op": "all",
        "conditions": [
          {
            "op": "fact",
            "path": "/expense/amount",
            "operator": "less-than-or-equal",
            "value": "5000"
          },
          {
            "op": "not",
            "condition": {
              "op": "fact",
              "path": "/expense/category",
              "operator": "in",
              "value": [
                "personal",
                "cash-equivalent"
              ]
            }
          },
          {
            "op": "evidence-present",
            "evidenceRequirement": "receipt"
          },
          {
            "op": "evidence-present",
            "evidenceRequirement": "cost-center"
          }
        ]
      },
      "outcome": "approve",
      "onUnknown": "escalate",
      "evidenceRequirementRefs": [
        "receipt",
        "cost-center"
      ],
      "sourceRefs": [
        "expense-policy"
      ],
      "rationale": "Ordinary supported expenses may follow the automatic path."
    }
  ],
  "exceptions": [
    {
      "id": "active-investigation",
      "description": "An expense connected to an active investigation requires human review.",
      "when": {
        "op": "fact",
        "path": "/expense/activeInvestigation",
        "operator": "equals",
        "value": true
      },
      "effect": "force-outcome",
      "outcome": "manual-review",
      "onUnknown": "escalate"
    }
  ],
  "fallbackOutcome": "manual-review",
  "escalation": {
    "triggers": [
      "not-applicable",
      "missing-required-evidence",
      "unknown",
      "conflict",
      "no-match"
    ],
    "target": {
      "kind": "human-role",
      "name": "Finance reviewer"
    },
    "message": "Review the expense, cited policy, missing evidence, and conflicting rules."
  },
  "metadata": {
    "authors": [
      "Judgment Pack Specification contributors"
    ],
    "createdAt": "2026-07-22T00:00:00Z",
    "license": "Apache-2.0"
  }
}