Skip to content
MirrorFirm

How does an escalation map onto an environment's state machine and tool actions?

Escalation reduces to a small set of case states, linked records and tool actions that an environment can load, enforce in strict or permissive mode, and grade.

Escalation maps onto a small state machine, which makes it straightforward to embed.

**Case states:** DRAFT, IN_REVIEW, PENDING_SENIOR, RETURNED, APPROVED, DECLINED. The only legal route to APPROVED for an over-limit case passes through PENDING_SENIOR.

**Records the agent reads:** - `case`: `case_id`, `amount`, `risk_grade`, `status`, `assignee_role` - `authority_rule`: `role`, `product`, `max_amount`, `max_grade`, `requires_dual_approval` - `case_note`: `case_id`, `author_role`, `body`, `created_at`

**Tool actions:** `get_case`, `get_authority`, `add_note`, `escalate(case_id, target_role, reason_code, note_id)` and `decide(case_id, outcome)`.

**Links:** `case.case_id` joins to `case_note.case_id` and `audit_event.case_id`; `authority_rule.role` joins to `case.assignee_role`.

In a **permissive** variant, `decide` succeeds even when the actor is over authority, and the grader reads the audit log afterwards. In a **strict** variant, `decide` returns a typed error such as `AUTHORITY_EXCEEDED`. Offering both lets you separate agents that know the limit from agents that were merely blocked by it.

A release can ship each table as JSONL with a schema file, so your loader maps rows directly onto your own state store.

A compact state machine and a few linked tables are enough to embed escalation, with strict and permissive variants separating knowledge from enforcement.

Audience:
Environment builders
Content type:
Integration
Buyer question:
What it is and why it matters

Content release: r-a220eb6e099b243b

More on Credit escalation