Escalation judge

Decide when a support thread crosses a named escalation policy threshold, record the case, and emit one governed escalation packet without sending or posting.

You’re reading version sha-66969ef648cc. Go to the current version

Overview

escalation-judge decides whether a support thread should open a priority case. It reads a triage packet, the thread body, explicit policy rules, and prior case state, then returns a typed decision. When escalation is warranted it appends one case-opened event through registry:runx/data-store@0.1.2 and emits one packet that names the target rail. It never posts to Slack, sends email, or pages a person; those are downstream governed runs selected by the packet.

In the manual

Runners

  • case_flow
  • judge

Declared by its execution profile. Read the profile

SKILL.md

Escalation Judge

escalation-judge decides whether a support thread should open a priority case. It reads a triage packet, the thread body, explicit policy rules, and prior case state, then returns a typed decision. When escalation is warranted it appends one case-opened event through registry:runx/data-store@0.1.2 and emits one packet that names the target rail. It never posts to Slack, sends email, or pages a person; those are downstream governed runs selected by the packet.

Decision Contract

Inputs:

  • triage_packet: JSON with classification, severity, and confidence.
  • thread_body: thread text used to ground churn signals declared in policy.
  • policy_rules: JSON with severity_thresholds, churn_risk_signals, and escalation_lanes.
  • aggregate_id: the support thread id and data-store aggregate id.
  • expected_version: the case stream version required for the append.
  • idempotency_key: retry key for the append.
  • data_source_ref: optional logical data source, defaulting to local://runx-escalation-judge/default.
  • store_id: optional deterministic local fixture store id.

Output:

json
{
  "schema": "runx.escalation_judge.result.v1",
  "decision": {
    "schema": "runx.escalation_judge.decision.v1",
    "escalate": true,
    "lane": "priority_support",
    "reason": "severity_threshold_matched"
  },
  "case_id": "case_...",
  "escalation_packet": {
    "schema": "runx.escalation.packet.v1",
    "target_rail": "slack://support-priority"
  }
}

State Flow

The case_flow profile is a graph for source-repo and operator runs:

  1. Read registry:runx/data-store@0.1.2 with read_projection for the thread.
  2. Decide from the triage packet, thread body, policy, and prior projection.
  3. When decision.escalate is true, append case_event with append_event(idempotency_key, expected_version).

The default judge runner returns the same typed decision and the exact data-store operation envelope for deterministic hosted harness and registry dogfood runs. Both paths use the same package files and same policy rules.

Refusals And Stops

  • Missing policy_rules returns needs_human and refuses to escalate.
  • Unknown severity returns needs_human; the skill does not invent severity.
  • A lane not declared in policy_rules.escalation_lanes returns needs_human.
  • A missing target_rail returns needs_human.
  • A prior active case returns no_change with no escalation packet.
  • No matched severity threshold or churn signal returns no_change.

Invocation

bash
runx skill ./skills/escalation-judge \
  --input-json triage_packet='{"classification":"billing","severity":"critical","confidence":0.94}' \
  -i thread_body="Customer says they will churn today unless restored." \
  --input-json policy_rules='{"severity_thresholds":{"high":"priority_support"},"churn_risk_signals":[{"signal":"explicit_churn","lane":"priority_support","patterns":["will churn"]}],"escalation_lanes":{"priority_support":{"target_rail":"slack://support-priority"}}}' \
  -i aggregate_id=thread-4821 \
  --input-json expected_version=0 \
  -i idempotency_key=thread-4821:escalate:v1 \
  --json

Published execution profile

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

Runners
  • case_flow
  • judge
Profile digestsha256:8eba2dd48c876497105b1b497d262ae91d7882b56825bad522987874a8b68e81
skill: escalation-judge
version: 0.1.0
catalog:
  kind: skill
  audience: public
  visibility: public
  role: canonical
  category: ops
connectors:
  store:
    operations:
      - events.append
      - projection.read
runners:
  case_flow:
    inputs:
      triage_packet:
        type: json
        required: true
        description: Support triage classification with classification, severity, and confidence.
      thread_body:
        type: string
        required: true
        description: Support thread body.
      policy_rules:
        type: json
        required: true
        description: Escalation policy with thresholds, churn signals, and lanes.
      aggregate_id:
        type: string
        required: true
        description: Thread id and data-store aggregate id.
      expected_version:
        type: number
        required: true
        description: Current case stream version for CAS append.
      idempotency_key:
        type: string
        required: true
        description: Stable retry key for the case append.
      data_source_ref:
        type: string
        required: false
        default: local://runx-escalation-judge/default
        description: Logical data source to bind through data-store.
      store_id:
        type: string
        required: false
        default: escalation-judge-local-v1
        description: Optional deterministic local fixture store id.
      resource:
        type: string
        required: false
        default: escalation_cases
        description: Data-store resource for escalation case events.
    steps:
      - id: read_projection
        operation: store/projection.read
        input:
          data_source_ref: $input.data_source_ref
          resource: $input.resource
          aggregate_id: $input.aggregate_id
      - id: decide
        skill: .
        runner: judge
        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
          data_source_ref: $input.data_source_ref
          store_id: $input.store_id
          resource: $input.resource
          prior_case_projection: $steps.read_projection.provider_operation.result
      - id: append_case
        when:
          equals: true
          value: $steps.decide.decision.escalate
        operation: store/events.append
        idempotency_key: $input.idempotency_key
        input:
          data_source_ref: $input.data_source_ref
          resource: $input.resource
          aggregate_id: $input.aggregate_id
          expected_version: $input.expected_version
          event: $steps.decide.case_event
  judge:
    default: true
    inputs:
      triage_packet:
        type: json
        required: true
        description: Support triage classification with classification, severity, and confidence.
      thread_body:
        type: string
        required: true
        description: Support thread body.
      policy_rules:
        type: json
        required: true
        description: Escalation policy with thresholds, churn signals, and lanes.
      aggregate_id:
        type: string
        required: true
        description: Thread id and data-store aggregate id.
      expected_version:
        type: number
        required: true
        description: Current case stream version for CAS append.
      idempotency_key:
        type: string
        required: true
        description: Stable retry key for the case append.
      data_source_ref:
        type: string
        required: false
        default: local://runx-escalation-judge/default
        description: Logical data source to bind through data-store.
      store_id:
        type: string
        required: false
        default: escalation-judge-local-v1
        description: Optional deterministic local fixture store id.
      resource:
        type: string
        required: false
        default: escalation_cases
        description: Data-store resource for escalation case events.
      prior_case_projection:
        type: json
        required: false
        description: Prior read_projection result for the aggregate id.
    steps:
      - id: judge
        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
          data_source_ref: $input.data_source_ref
          store_id: $input.store_id
          resource: $input.resource
          prior_case_projection: $input.prior_case_projection
        artifacts:
          named_emits:
            decision: runx.escalation_judge.decision.v1
            escalation_packet: runx.escalation.packet.v1
            case_event: runx.escalation.case_event.v1
harness:
  cases:
    - name: escalation-judge-escalates-critical-churn
      runner: judge
      inputs:
        triage_packet:
          classification: support-triage-reply
          severity: critical
          confidence: 0.94
        thread_body: The customer says they will churn today unless executive support restores access before renewal.
        policy_rules:
          severity_thresholds:
            high:
              lane: priority_support
              reason: high_or_critical_customer_impact
          churn_risk_signals:
            - signal: explicit_churn
              lane: priority_support
              patterns:
                - will churn
                - before renewal
          escalation_lanes:
            priority_support:
              target_rail: slack://support-priority
              description: Priority internal support escalation lane.
        aggregate_id: thread-4821
        expected_version: 0
        idempotency_key: thread-4821:escalate:v1
        data_source_ref: local://runx-escalation-judge/default
        store_id: escalation-judge-local-v1
        resource: escalation_cases
        prior_case_projection: {}
      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: escalation-judge-no-change-low-risk
      runner: judge
      inputs:
        triage_packet:
          classification: support-triage-reply
          severity: low
          confidence: 0.88
        thread_body: The user asks for a status update and has not mentioned churn, legal review, executives, or deadlines.
        policy_rules:
          severity_thresholds:
            high:
              lane: priority_support
              reason: high_or_critical_customer_impact
          churn_risk_signals:
            - signal: explicit_churn
              lane: priority_support
              patterns:
                - will churn
                - cancel before renewal
          escalation_lanes:
            priority_support:
              target_rail: slack://support-priority
              description: Priority internal support escalation lane.
        aggregate_id: thread-1002
        expected_version: 0
        idempotency_key: thread-1002:judge:v1
        data_source_ref: local://runx-escalation-judge/default
        store_id: escalation-judge-local-v1
        resource: escalation_cases
        prior_case_projection: {}
      expect:
        status: sealed
        receipt:
          schema: runx.receipt.v1

Published package and test evidence.

This exact version passed its recorded harness run: 2 checks passed · 0 failed.

Test result

Harness resultPassed
Tested versionsha-66969ef648cc
Recorded result2 checks passed · 0 failed
Result sourceReported by the publisher (runx_registry_publish)
Suiterunx-harness
Test recorded
Declared cases2
Test recordOpen the recorded run
Inspect receipt referencessha256:c25de6f3401a9c2628abcafc368602bda1fbd1fe4810d805d17015f260d78fbasha256:9f21c915f9208f1131db93e8973daf6ef251c48bb95a0ea28e5626db06a1fd0b

Package identity

Published revisionsha-66969ef648cc
Content digestsha256:66969ef648cc664157ea6166026f666e691e520b21e32b06d701ba520ebd555a
SKILL.md digestsha256:eeebdcaeb437e6c55e5010413394348c667fc6970a85024a0903852764e372fe
Execution profile digestsha256:8eba2dd48c876497105b1b497d262ae91d7882b56825bad522987874a8b68e81
Publisher identityUnverified publisher · reluctantskeptic
Trust tierCommunityPublished through the registry without publisher verification. This tier is not a code assessment.
Attestations
  • Publisher · Declaredreluctantskeptic · 17 Oct 2026
Source provenanceNot published with this version

Version history

  1. 0.1.2Content digest sha256:0cfc4df292d8e2ff478d307001b373e553d635caf52689a2dfbee58248053e70
  2. sha-ff81e1271044Content digest sha256:ff81e1271044c28a06f95963b0e1def673f1ff467265fa49d5b5d72b9ae18a62
  3. sha-da2fe7866444Content digest sha256:da2fe7866444e2af8bd432f7cfd4b35978d6bd382bccd2902664dc0b62456d0c
  4. sha-66969ef648ccViewingContent digest sha256:66969ef648cc664157ea6166026f666e691e520b21e32b06d701ba520ebd555a
  5. sha-f742f78a44daContent digest sha256:f742f78a44da259e69548c8b0d3e98b2138a56ab281fd5240d5c9259633a2b77