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-b574a4f627ba. 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

  • decide
  • judge

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, and confidence, normally from support-triage-reply or 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, and escalation_lanes. Missing policy rules produce needs_input.
  • data_source_ref and store_id: the pinned data-store binding.
  • aggregate_id: the thread id. It is the data-store aggregate id.
  • expected_version and idempotency_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, and escalation_packet appear only when escalation is warranted.
  • escalation_packet names target_rail and keeps rail_effect: none.
  • stop_state appears when the thread does not escalate, when required input is missing, when policy is ambiguous, or when a policy threshold names an undeclared lane.
  • observations cite 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:

  1. read_projection loads the prior escalation-case projection for the thread.
  2. decide evaluates severity thresholds and churn signals against declared policy lanes.
  3. append_event records support_case.escalation_opened with expected_version and idempotency_key only when decision.escalate == true.
  4. read_projection reads 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:

bash
runx harness ./skills/escalation-judge --json

Harness 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 with decision.escalate=false, no case, and no escalation packet.
  • missing-policy-needs-input: policy rules are absent, so the skill refuses to escalate and reports needs_input.
  • undeclared-lane-needs-human: a threshold matches but names an undeclared lane, so the skill refuses to route and reports needs_human.

Example Invocation

bash
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:v1

Published execution profile

The execution profile published with sha-b574a4f627ba, shown as its exact bytes.

Runners
  • decide
  • judge
Profile digestsha256:755225d5d004a5178cff380e88533a4d17a191904f78f6f8d952e81a875c13bc
skill: escalation-judge
version: 0.1.1
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 resultPassed
Tested versionsha-b574a4f627ba
Recorded result4 checks passed · 0 failed
Result sourceReported by the publisher (runx_registry_publish)
Suiterunx-harness
Test recorded
Declared cases4
Test recordOpen the recorded run
Inspect receipt referencessha256:c3fc12e7a9a3e7b3755742f29c7ab45292482cbcbbd78a8fe26db149e4f663b1sha256:f795e0402c0c1784c76ff403fcfb7bcb86395290c8885533634f5b93d7ca37a8sha256:0647036374c75161f49011f6f3d9a967bbb84781208e4d0f557cbab469e43ba4sha256:a09d4b780572d376efb18a6e53d78480cfef922ff2bf9f7c3e0d385a4a6d2a01

Package identity

Published revisionsha-b574a4f627ba
Content digestsha256:b574a4f627ba081177f9da084db5d26e5008bb1481d65910ca18ef9182563910
SKILL.md digestsha256:c155e4b820da5b96f120fbd67b218b522d6654f5a48efd5c4f1f5652ad98de0a
Execution profile digestsha256:755225d5d004a5178cff380e88533a4d17a191904f78f6f8d952e81a875c13bc
Publisher identityUnverified publisher · fy
Trust tierCommunityPublished through the registry without publisher verification. This tier is not a code assessment.
Attestations
  • Publisher · Declaredfy · 17 Oct 2026
Source provenanceNot published with this version

Version history

  1. 0.1.2Content digest sha256:b66ce3415a49f3c3b6153fa96dbc4ea99dc4815736df762f61ca03e067e7004a
  2. sha-b574a4f627baViewingContent digest sha256:b574a4f627ba081177f9da084db5d26e5008bb1481d65910ca18ef9182563910
  3. sha-0c0adb355f4eContent digest sha256:0c0adb355f4ed0008ecbc51197e26e8db17ee41bb58eeeea2fd0812efbc68ad2
  4. sha-72c1ae663f9eContent digest sha256:72c1ae663f9ec496455a160feec58a61fd7a990ff54fc2e7ad9df6e285af553f
  5. sha-ae0c362412f7Content digest sha256:ae0c362412f7115b551a0d4e0429c29ce6c4b35c7e79cde78de1e3701832797c