Escalation judge
Decide whether a support thread should open an escalation case, append that case to data-store, and name the downstream rail without dispatching it.
You’re reading version sha-72c1ae663f9e. Go to the current version
Overview
Judge whether a support thread crosses a named escalation policy threshold. The skill reads a triage packet, the thread body, escalation policy rules, and prior case state. It appends a durable case record only when escalation is warranted and emits a typed escalation packet that names the downstream rail. It never posts to Slack, sends customer email, pages an executive lane, or proposes a live operational action.
The case append is a guarded compare-and-set write through data-store
(read_projection -> append_event); the egress consequence is gated elsewhere.
A downstream operator can consume the named target rail and issue a separate
governed slack-notify or send-as run.
In the manual
Runners
decidejudge
Declared by its execution profile. Read the profile
SKILL.md
Escalation Judge
Judge whether a support thread crosses a named escalation policy threshold. The skill reads a triage packet, the thread body, escalation policy rules, and prior case state. It appends a durable case record only when escalation is warranted and emits a typed escalation packet that names the downstream rail. It never posts to Slack, sends customer email, pages an executive lane, or proposes a live operational action.
The case append is a guarded compare-and-set write through data-store
(read_projection -> append_event); the egress consequence is gated elsewhere.
A downstream operator can consume the named target rail and issue a separate
governed slack-notify or send-as run.
Inputs
triage_packet:classification,severity, andconfidence, normally fromsupport-triage-replyor an equivalent bounded triage source.thread_body: support thread text used only to ground severity and churn signal checks.policy_rules:severity_thresholds,churn_risk_signals, andescalation_lanes. Missing policy rules produceneeds_input.data_source_refandstore_id: the pinned data-store binding.aggregate_id: the thread id. It is the data-store aggregate id.expected_versionandidempotency_key: optimistic concurrency and retry safety for the case append.
Output Contract
The output packet is runx.support.escalation_judge.v1 data:
decision{escalate,lane,reason}always appears.case_id,case_event, andescalation_packetappear only when escalation is warranted.escalation_packetnamestarget_railand keepsrail_effect: none.stop_stateappears when the thread does not escalate, when required input is missing, when policy is ambiguous, or when a policy threshold names an undeclared lane.observationscite the matched threshold, severity, churn signals, prior-case projection, case id, stop reason, target rail, harness cases, and data-store append controls.
The packet must not contain an operational_proposal. It is a judgment and
state append, not a live notification or send.
State Model
The default graph follows the github-sync-style shape:
read_projectionloads the prior escalation-case projection for the thread.decideevaluates severity thresholds and churn signals against declared policy lanes.append_eventrecordssupport_case.escalation_openedwithexpected_versionandidempotency_keyonly whendecision.escalate == true.read_projectionreads back the durable case state for receipt evidence.
If a prior case projection already exists, the skill stops with no new case so the same thread is not re-escalated.
Escalation Boundary
The policy must declare every lane under policy_rules.escalation_lanes.
Severity thresholds and churn-risk signals can only route to those lanes. If a
threshold names an undeclared lane, the result is needs_human and no case is
opened.
Internal lanes should name a downstream rail such as
downstream.slack-notify.priority-support. Cross-provider lanes can name a
separate send-as rail. This skill only names the rail; the downstream operator
or driver performs the governed action in a separate run.
Local Harness
Run:
runx harness ./skills/escalation-judge --jsonHarness cases:
high-severity-churn-opens-priority-case: critical support thread and renewal risk match named policy thresholds, append a case, and emit a priority-support escalation packet.low-confidence-howto-stops-no-change: low-severity how-to thread matches no threshold, so the graph stops withdecision.escalate=false, no case, and no escalation packet.missing-policy-needs-input: policy rules are absent, so the skill refuses to escalate and reportsneeds_input.undeclared-lane-needs-human: a threshold matches but names an undeclared lane, so the skill refuses to route and reportsneeds_human.
Example Invocation
runx skill escalation-judge --json \
--input-json triage_packet='{"classification":"bug","severity":"critical","confidence":0.93}' \
-i thread_body='Enterprise tenant says production webhooks are down, renewal is blocked, and the sponsor may cancel.' \
--input-json policy_rules='{"severity_thresholds":[{"name":"severity-high-or-critical","lane":"priority_support","min_severity":"high","classifications":["bug"]}],"churn_risk_signals":[{"name":"renewal_blocked","lane":"priority_support","terms":["renewal is blocked","cancel"]}],"escalation_lanes":{"priority_support":{"target_rail":"downstream.slack-notify.priority-support","consequence":"internal_lane"}}}' \
-i data_source_ref=local://runx-escalation-judge/example \
-i store_id=escalation-judge-example-v2 \
-i aggregate_id=thread:acct-4242:case-1001 \
--input-json expected_version=0 \
-i idempotency_key=thread:acct-4242:case-1001:escalation:v1Published execution profile
The execution profile published with sha-72c1ae663f9e, shown as its exact bytes.
| Runners |
|
|---|---|
| Profile digest | sha256:7cf9e3c3aad3befd41e596ccc838e4d452389369fd36dfdad9fc3fb80827bf71 |
skill: escalation-judge
version: 0.1.0
catalog:
kind: graph
audience: public
visibility: public
role: canonical
category: ops
connectors:
store:
operations:
- events.append
- projection.read
runners:
decide:
inputs:
triage_packet:
type: json
required: true
description: triage_packet{classification,severity,confidence}; severity must be one of low, medium, high, critical.
thread_body:
type: string
required: true
description: Support thread body used for grounded churn and severity evidence.
policy_rules:
type: json
required: false
description: policy_rules{severity_thresholds,churn_risk_signals,escalation_lanes}; missing rules produce needs_input.
aggregate_id:
type: string
required: true
description: Thread id used as the escalation case aggregate.
expected_version:
type: number
required: true
description: Current stream version required by the CAS append_event that records the case.
idempotency_key:
type: string
required: true
description: Stable case append key.
prior_case:
type: json
required: false
description: Prior case projection read from data-store before judging escalation.
steps:
- id: decide
tool:
command: node
args:
- run.mjs
inputs:
triage_packet: $input.triage_packet
thread_body: $input.thread_body
policy_rules: $input.policy_rules
aggregate_id: $input.aggregate_id
expected_version: $input.expected_version
idempotency_key: $input.idempotency_key
prior_case: $input.prior_case
artifacts:
wrap_as: escalation_judgment
judge:
default: true
inputs:
triage_packet:
type: json
required: true
description: triage_packet{classification,severity,confidence} from support-triage-reply or an equivalent bounded triage source.
thread_body:
type: string
required: true
description: Support thread body used only for grounded severity and churn signal matching.
policy_rules:
type: json
required: false
description: policy_rules{severity_thresholds,churn_risk_signals,escalation_lanes}; missing rules produce a needs_input stop.
data_source_ref:
type: string
required: true
description: Logical data-store binding for the escalation case event stream.
store_id:
type: string
required: true
description: Pinned data-store id for deterministic harness and dogfood receipts.
aggregate_id:
type: string
required: true
description: Thread id used as the data-store aggregate id.
expected_version:
type: number
required: true
description: Current stream version required by the CAS append_event that records the case.
idempotency_key:
type: string
required: true
description: Stable case append key so retries do not open duplicate escalation cases.
policy:
guards:
- step: append-case
value: $steps.decide.escalation_judgment.decision.escalate
equals: true
- step: readback
value: $steps.decide.escalation_judgment.decision.escalate
equals: true
steps:
- id: read-prior-case
operation: store/projection.read
input:
data_source_ref: $input.data_source_ref
resource: escalation_cases
aggregate_id: $input.aggregate_id
- id: decide
label: judge escalation policy without dispatching the target rail
skill: .
runner: decide
inputs:
triage_packet: $input.triage_packet
thread_body: $input.thread_body
policy_rules: $input.policy_rules
aggregate_id: $input.aggregate_id
expected_version: $input.expected_version
idempotency_key: $input.idempotency_key
prior_case: $steps.read-prior-case.provider_operation.result.projection
- id: append-case
operation: store/events.append
idempotency_key: $input.idempotency_key
input:
data_source_ref: $input.data_source_ref
resource: escalation_cases
aggregate_id: $input.aggregate_id
expected_version: $input.expected_version
event: $steps.decide.escalation_judgment.case_event
- id: readback
operation: store/projection.read
input:
data_source_ref: $input.data_source_ref
resource: escalation_cases
aggregate_id: $input.aggregate_id
harness:
cases:
- name: high-severity-churn-opens-priority-case
runner: judge
inputs:
triage_packet:
classification: bug
severity: critical
confidence: 0.93
thread_body: Enterprise tenant says production webhooks are down, their renewal is blocked, and the VP sponsor will cancel if there is no priority support response today.
policy_rules:
severity_thresholds:
- name: severity-high-or-critical
lane: priority_support
min_severity: high
classifications:
- bug
- account_access
- name: legal-or-exec-critical
lane: legal_review
min_severity: critical
classifications:
- legal
- abuse
churn_risk_signals:
- name: renewal_blocked
lane: priority_support
terms:
- renewal is blocked
- cancel
- sponsor
escalation_lanes:
priority_support:
target_rail: downstream.slack-notify.priority-support
consequence: internal_lane
legal_review:
target_rail: downstream.slack-notify.legal-review
consequence: internal_lane
data_source_ref: local://runx-escalation-judge/harness
store_id: escalation-judge-harness-v2
aggregate_id: thread:acct-4242:case-1001
expected_version: 0
idempotency_key: thread:acct-4242:case-1001:escalation:v1
expect:
status: sealed
receipt:
schema: runx.receipt.v1
operator_journeys:
- mode: standalone
confusors:
- helpdesk
- ops-desk
request: Decide whether this support thread should become an escalation case.
expected_outcome: Return an escalation decision recorded in the data store, naming the downstream rail without dispatching it.
- mode: composed
request: Continue this escalation-judge work from evidence already gathered upstream.
expected_outcome: Return an escalation decision recorded in the data store, naming the downstream rail without dispatching it.
prior_evidence:
- The support thread and policy rules already supplied.
must_not_repeat:
- Do not dispatch the escalation.
- name: low-confidence-howto-stops-no-change
runner: judge
inputs:
triage_packet:
classification: how_to
severity: low
confidence: 0.82
thread_body: Customer asks where to find the webhook setup docs. No outage, renewal, legal, executive, or churn language is present.
policy_rules:
severity_thresholds:
- name: severity-high-or-critical
lane: priority_support
min_severity: high
classifications:
- bug
- account_access
churn_risk_signals:
- name: renewal_blocked
lane: priority_support
terms:
- renewal is blocked
- cancel
escalation_lanes:
priority_support:
target_rail: downstream.slack-notify.priority-support
consequence: internal_lane
data_source_ref: local://runx-escalation-judge/harness
store_id: escalation-judge-harness-v2
aggregate_id: thread:acct-4242:case-1002
expected_version: 0
idempotency_key: thread:acct-4242:case-1002:escalation:v1
expect:
status: policy_denied
receipt:
schema: runx.receipt.v1
- name: missing-policy-needs-input
runner: judge
inputs:
triage_packet:
classification: bug
severity: high
confidence: 0.88
thread_body: Production issue is urgent, but the caller did not provide policy_rules.
data_source_ref: local://runx-escalation-judge/harness
store_id: escalation-judge-harness-v2
aggregate_id: thread:acct-4242:case-1003
expected_version: 0
idempotency_key: thread:acct-4242:case-1003:escalation:v1
expect:
status: policy_denied
receipt:
schema: runx.receipt.v1
- name: undeclared-lane-needs-human
runner: judge
inputs:
triage_packet:
classification: bug
severity: critical
confidence: 0.91
thread_body: Critical outage with executive visibility, but the matching policy threshold names an undeclared lane.
policy_rules:
severity_thresholds:
- name: exec-critical
lane: exec_visibility
min_severity: critical
classifications:
- bug
churn_risk_signals: []
escalation_lanes:
priority_support:
target_rail: downstream.slack-notify.priority-support
consequence: internal_lane
data_source_ref: local://runx-escalation-judge/harness
store_id: escalation-judge-harness-v2
aggregate_id: thread:acct-4242:case-1004
expected_version: 0
idempotency_key: thread:acct-4242:case-1004:escalation:v1
expect:
status: policy_denied
receipt:
schema: runx.receipt.v1
Published package and test evidence.
This exact version passed its recorded harness run: 4 checks passed · 0 failed.
Test result
| Harness result | Passed |
|---|---|
| Tested version | sha-72c1ae663f9e |
| Recorded result | 4 checks passed · 0 failed |
| Result source | Reported by the publisher (runx_registry_publish) |
| Suite | runx-harness |
| Test recorded | |
| Declared cases | 4 |
| Test record | Open the recorded run |
Inspect receipt references
sha256:89de127f0a3def5e6492dde24fccecfb44730277201f1770bfdda83816279534sha256:486f59e02c6d2d6a6336df7539a9daf5a57fa8de12dca7536cb77a2efbffb39fsha256:0e3497169e857991d5b3e2bbe6136fbe056f8f7fef94f6eb73f7a601835038e6sha256:fe87387a46e469eb0208d6cbcc4fb0a4cd2329ca42543cb3d3c032763c5f8b82Package identity
| Published revision | sha-72c1ae663f9e |
|---|---|
| Content digest | sha256:72c1ae663f9ec496455a160feec58a61fd7a990ff54fc2e7ad9df6e285af553f |
| SKILL.md digest | sha256:c155e4b820da5b96f120fbd67b218b522d6654f5a48efd5c4f1f5652ad98de0a |
| Execution profile digest | sha256:7cf9e3c3aad3befd41e596ccc838e4d452389369fd36dfdad9fc3fb80827bf71 |
| Publisher identity | Unverified publisher · fy |
| Trust tier | CommunityPublished through the registry without publisher verification. This tier is not a code assessment. |
| Attestations |
|
| Source provenance | Not published with this version |
Version history
0.1.2Content digest sha256:b66ce3415a49f3c3b6153fa96dbc4ea99dc4815736df762f61ca03e067e7004asha-b574a4f627baContent digest sha256:b574a4f627ba081177f9da084db5d26e5008bb1481d65910ca18ef9182563910sha-0c0adb355f4eContent digest sha256:0c0adb355f4ed0008ecbc51197e26e8db17ee41bb58eeeea2fd0812efbc68ad2sha-72c1ae663f9eViewingContent digest sha256:72c1ae663f9ec496455a160feec58a61fd7a990ff54fc2e7ad9df6e285af553fsha-ae0c362412f7Content digest sha256:ae0c362412f7115b551a0d4e0429c29ce6c4b35c7e79cde78de1e3701832797c