Expense approval, annotated
The expense approval example with annotations and a value set; apart from its pack version, its evaluation form is the minimal expense approval pack.
- Pack ID
https://example.com/judgment-packs/expense-approval- Pack version
0.2.0- Outcomes
- 3
- Rules
- 3
Guide to this example
Focus: Annotations and a value set, on the expense pack the other example already explains.
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 are not evaluation-corpus rows and assert no evaluator-conformance result.
What this example demonstrates
The minimal expense pack with annotations on the pack, its outcomes, its rules and the entries of one declared value set, which two rules reference with the operator in instead of repeating an inline array.
Good for
- Seeing where org.judgmentpack.annotations may appear: the root, each outcome, each rule and each value-set entry, and nowhere else.
- Following a valueSet reference from a fact condition to the declared set it names.
- Comparing this file with minimal-expense-approval.json: removing the annotations and replacing each reference with its set's values gives that pack, apart from the pack version (Core §8.5).
Edges to inspect
- Annotations are inert. Core assigns no meaning to a key such as policy-section or a value such as human, and no evaluator reads them; the expected decision is the same with or without them.
- The prohibited-categories set holds two string entries. A fact value compared with the set uses the same equality as an inline in operand, so a number or a differently cased string matches no entry.
- This page is not a corpus row. The decision behavior is the one minimal-expense-approval.json describes, under the §§7–8 resolution model for an implementation claiming evaluator conformance.
Failure paths
- In a scratch copy, point a valueSet at an id no set declares; the document can keep a valid JSON shape but must fail semantic document conformance.
- Put both value and valueSet on one condition, or use valueSet with equals, to produce a structural failure.
- Add org.judgmentpack.annotations to metadata.requiredExtensions, or to the decision's extensions; both are structural failures, because the extension is never requirable and appears only in its four positions.
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.6.0",
"id": "https://example.com/judgment-packs/expense-approval",
"version": "0.2.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.",
"extensions": {
"org.judgmentpack.annotations": {
"path": "automatic"
}
}
},
{
"id": "manual-review",
"label": "Manual review",
"description": "An accountable finance reviewer must decide.",
"extensions": {
"org.judgmentpack.annotations": {
"path": "human"
}
}
},
{
"id": "reject",
"label": "Reject",
"description": "The expense falls in a prohibited category.",
"extensions": {
"org.judgmentpack.annotations": {
"path": "automatic"
}
}
}
],
"rules": [
{
"id": "prohibited-category",
"description": "Reject expenses in a prohibited category.",
"when": {
"op": "fact",
"path": "/expense/category",
"operator": "in",
"valueSet": "prohibited-categories"
},
"outcome": "reject",
"onUnknown": "escalate",
"evidenceRequirementRefs": [
"receipt",
"cost-center"
],
"sourceRefs": [
"expense-policy"
],
"rationale": "The example policy prohibits these categories.",
"extensions": {
"org.judgmentpack.annotations": {
"category": [
"policy",
"prohibition"
]
}
}
},
{
"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.",
"extensions": {
"org.judgmentpack.annotations": {
"category": "threshold"
}
}
},
{
"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",
"valueSet": "prohibited-categories"
}
},
{
"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.",
"extensions": {
"org.judgmentpack.annotations": {
"category": "threshold",
"review-cycle": "monthly"
}
}
}
],
"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"
}
],
"valueSets": [
{
"id": "prohibited-categories",
"description": "Expense categories the example policy prohibits.",
"entries": [
{
"value": "personal",
"description": "A personal expense.",
"extensions": {
"org.judgmentpack.annotations": {
"policy-section": "4.2"
}
}
},
{
"value": "cash-equivalent",
"description": "Cash or an instrument redeemable as cash.",
"extensions": {
"org.judgmentpack.annotations": {
"policy-section": "4.3",
"category": [
"cash",
"fraud-risk"
]
}
}
}
]
}
],
"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"
},
"extensions": {
"org.judgmentpack.annotations": {
"domain": "finance",
"review-cycle": "quarterly"
}
}
}