Escalation judge

Decide whether a triaged thread crosses declared escalation policy, append one case event through data-store, and emit a typed downstream packet without posting or sending.

You’re reading version sha-7492247da117. Go to the current version

Overview

Escalation Judge turns an issue, support, or incident thread into one bounded decision: escalate, stop, or ask for human input. It is a judge and case opener, not a notifier. It reads the existing case projection, compares a triage packet and thread body against declared policy rules, appends exactly one case event through registry:runx/data-store@0.1.2 when escalation is warranted, and emits a typed packet naming the downstream rail. The downstream operator or driver must issue a separate governed slack-notify run for an internal lane or send-as run for a cross-provider lane.

SKILL.md

Escalation Judge

Escalation Judge turns an issue, support, or incident thread into one bounded decision: escalate, stop, or ask for human input. It is a judge and case opener, not a notifier. It reads the existing case projection, compares a triage packet and thread body against declared policy rules, appends exactly one case event through registry:runx/data-store@0.1.2 when escalation is warranted, and emits a typed packet naming the downstream rail. The downstream operator or driver must issue a separate governed slack-notify run for an internal lane or send-as run for a cross-provider lane.

What This Skill Does

  1. Validate policy first. Refuse when policy_rules are missing, when escalation_lanes are empty, or when the selected lane is not declared.
  2. Read prior case state. Use the thread id as aggregate_id and read the projection before deciding. Existing open cases are treated as state, not ignored duplicate work.
  3. Match named thresholds. Escalate only when the triage severity or grounded churn-risk signal crosses a named policy threshold. Do not invent severity or signals outside triage_packet and thread_body.
  4. Append one case event. For an escalation, append an ungated CAS event via append_event(idempotency_key, expected_version) on registry:runx/data-store@0.1.2. The output includes the appended case_id, store id, aggregate id, expected version, and event type.
  5. Name the target rail. Emit an escalation packet that names only the target rail and lane. It never posts to Slack, sends email, opens GitHub comments, or calls a provider itself.
  6. Stop cleanly. For no threshold match, return decision.escalate: false with reason no_change, no case event, and no escalation packet. For ambiguous severity or missing policy detail, return needs_human.

Contract Boundaries

  • Inputs are typed.
    • triage_packet: classification, severity, confidence, and optional signals.
    • thread_body: source text used only for grounded signal confirmation.
    • policy_rules: severity_thresholds, churn_risk_signals, and escalation_lanes.
    • aggregate_id: the stable thread id and data-store aggregate id.
    • expected_version: the projection version read before append.
    • idempotency_key: stable key for the append.
  • State is explicit. The data-store shape is read_projection -> decide -> append_event(idempotency_key, expected_version). A caller must pin a store_id; the default harness store is runx-escalation-cases.
  • Output is typed. The primary artifact is escalation_judgment, containing decision, data_store, optional case_event, optional escalation_packet, needs_input, and needs_human.
  • No provider send. The escalation packet names slack-notify or send-as as the target rail. Execution of that rail is a separate governed run.

Refusals And Stops

  • Refuse if policy_rules are absent.
  • Refuse if the chosen lane is not in policy_rules.escalation_lanes.
  • Refuse if the task asks this skill to post, send, page, or notify directly.
  • Return needs_human when severity is ambiguous, policy thresholds conflict, or thread evidence cannot ground a churn signal.
  • Return a sealed stop with reason: no_change when policy exists but no threshold is crossed.

Decision Rules

Severity thresholds are named rules, for example:

yaml
severity_thresholds:
  sev2_customer_impact:
    min_severity: high
    lane: customer-risk-internal
    target_rail: slack-notify

Churn-risk signals are also named rules:

yaml
churn_risk_signals:
  renewal_blocked:
    keywords: ["renewal blocked", "contract at risk"]
    lane: customer-risk-external
    target_rail: send-as

The output must cite the exact rule name matched, the evidence source, and the lane. If several rules match, choose the most severe declared threshold, then prefer the policy order. If none match, stop with no_change.

Quality Profile

  • Purpose: make one auditable escalation decision for a triaged thread.
  • Audience: operators, reviewers, and downstream governed notification lanes.
  • Artifact contract: read projection, named policy match, case append result, target rail packet, and refusal/stop reason.
  • Evidence bar: every escalation cites the severity or churn signal and the named threshold; every append cites store_id, aggregate_id, expected_version, idempotency_key, and case_id.
  • Safety bar: policy is caller-owned, lanes are allowlisted, and sends are always deferred to a separate governed skill.
  • Stop conditions: missing policy, undeclared lane, ambiguous severity, or no threshold match.

Output Schema

yaml
escalation_judgment:
  decision:
    escalate: boolean
    lane: string | null
    reason: policy_threshold_matched | no_change | needs_human | refused
    matched_policy: string | null
    matched_threshold: string | null
  evidence:
    severity: string
    confidence: number
    grounded_signals:
      - name: string
        source: triage_packet | thread_body
        excerpt_or_ref: string
  data_store:
    store_id: string
    aggregate_id: string
    read_projection:
      version: number
      open_case_ids: [string]
      prior_escalation_count: number
    append_event:
      attempted: boolean
      idempotency_key: string
      expected_version: number
      event_type: escalation.case_opened | null
      case_id: string | null
  case_event:
    case_id: string
    event_type: escalation.case_opened
    aggregate_id: string
    payload:
      classification: string
      severity: string
      lane: string
      matched_policy: string
  escalation_packet:
    packet_type: runx.escalation.packet.v1
    case_id: string
    target_rail: slack-notify | send-as
    lane: string
    thread_ref: string
    summary: string
  needs_input: [string]
  needs_human: [string]

Inputs

  • triage_packet (required): classification, severity, confidence, and optional signals from an upstream triage skill.
  • thread_body (required): sanitized thread body or digest-bearing excerpt.
  • policy_rules (required): severity thresholds, churn-risk signals, and declared escalation lanes.
  • aggregate_id (required): stable thread id and data-store aggregate id.
  • expected_version (required): projection version expected by the append.
  • idempotency_key (required): stable idempotency key for the case append.
  • store_id (optional): pinned data-store id; defaults to runx-escalation-cases.

Published execution profile

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

Runner
  • judge
Profile digestsha256:157ce470eb93d0f236ee6b24f9f5dff04092bb4b11576d7e19f0f5f64eb4384f
skill: escalation-judge
version: 0.1.0
catalog:
  kind: skill
  audience: operator
  visibility: public
  role: canonical
  category: ops
runners:
  judge:
    default: true
    inputs:
      triage_packet:
        type: json
        required: true
        description: classification, severity, confidence, and optional signals from upstream triage.
      thread_body:
        type: string
        required: true
        description: Sanitized source thread text or excerpt used to ground churn-risk signals.
      policy_rules:
        type: json
        required: false
        description: Caller-owned severity thresholds, churn risk signals, and allowlisted escalation lanes.
      aggregate_id:
        type: string
        required: true
        description: Stable thread id and data-store aggregate id.
      expected_version:
        type: number
        required: true
        description: Projection version read before append_event.
      idempotency_key:
        type: string
        required: true
        description: Stable idempotency key for append_event.
      store_id:
        type: string
        required: false
        description: Pinned data-store id; defaults to runx-escalation-cases.
    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
          store_id: $input.store_id
        artifacts:
          wrap_as: escalation_judgment_packet
harness:
  cases:
    - name: sealed-escalates-high-severity-and-appends-case
      inputs:
        triage_packet:
          classification: production_incident
          severity: high
          confidence: 0.93
          signals:
            - customer_impact_confirmed
        thread_body: Enterprise customer reports production outage affecting checkout for two regions; renewals team notes account is blocked until incident owner responds.
        policy_rules:
          severity_thresholds:
            sev2_customer_impact:
              min_severity: high
              lane: customer-risk-internal
              target_rail: slack-notify
          churn_risk_signals:
            renewal_blocked:
              keywords:
                - renewal
                - blocked
              lane: customer-risk-internal
              target_rail: slack-notify
          escalation_lanes:
            customer-risk-internal:
              target_rail: slack-notify
              owner: ops-duty
        aggregate_id: thread-gh-4821
        expected_version: 7
        idempotency_key: escalation:thread-gh-4821:sev2:2026-06-29
        store_id: runx-escalation-cases
      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: sealed-stops-no-threshold-no-change
      inputs:
        triage_packet:
          classification: support_question
          severity: low
          confidence: 0.88
          signals:
            - docs_question
        thread_body: User asks where the configuration flag is documented; no customer impact, renewal concern, or repeated failure is present.
        policy_rules:
          severity_thresholds:
            sev2_customer_impact:
              min_severity: high
              lane: customer-risk-internal
              target_rail: slack-notify
          churn_risk_signals:
            renewal_blocked:
              keywords:
                - renewal blocked
                - contract at risk
              lane: customer-risk-external
              target_rail: send-as
          escalation_lanes:
            customer-risk-internal:
              target_rail: slack-notify
              owner: ops-duty
            customer-risk-external:
              target_rail: send-as
              owner: account-duty
        aggregate_id: thread-gh-4920
        expected_version: 2
        idempotency_key: escalation:thread-gh-4920:low:2026-06-29
        store_id: runx-escalation-cases
      expect:
        status: sealed
        receipt:
          schema: runx.receipt.v1
    - name: refuses-missing-policy-rules
      inputs:
        triage_packet:
          classification: production_incident
          severity: critical
          confidence: 0.91
        thread_body: Critical outage, but the caller did not provide an escalation policy.
        aggregate_id: thread-gh-5000
        expected_version: 1
        idempotency_key: escalation:thread-gh-5000:critical:2026-06-29
      expect:
        status: failure
        receipt:
          schema: runx.receipt.v1

Published package and test evidence.

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

Test result

Harness resultPassed
Tested versionsha-7492247da117
Recorded result3 checks passed · 0 failed
Result sourceReported by the publisher (runx_registry_publish)
Suiterunx-harness
Test recorded
Declared cases3
Test recordOpen the recorded run
Inspect receipt referencessha256:a1e0fc85c87a2f8e62d43eb8195c3ad5d9136cde7678708ce9a9b9e00c61357fsha256:28459f69e5a40486d5ea68dca5b36070974810d46645c1aee2efbb290cd0c4basha256:321532fdd9b267a4780edef5bd0d45b3868fb342b3e10d7181aff7f9ae7532ec

Package identity

Published revisionsha-7492247da117
Content digestsha256:7492247da117f9ccdd844548ea24c33d01c525a408cd9cea6d40e94896ca1061
SKILL.md digestsha256:279e779c87a33dbc15c76eb18cfab116e2e1c1cf3c85d56c17bd4bf4ebfc7cfb
Execution profile digestsha256:157ce470eb93d0f236ee6b24f9f5dff04092bb4b11576d7e19f0f5f64eb4384f
Publisher identityUnverified publisher · RYDE
Trust tierCommunityPublished through the registry without publisher verification. This tier is not a code assessment.
Attestations
  • Publisher · DeclaredRYDE · 17 Oct 2026
Source provenanceNot published with this version

Version history

  1. sha-e4f6baae4aefContent digest sha256:e4f6baae4aefde1335cd87749bf441389727157a77cd1d59a46a17478156464e
  2. sha-7492247da117ViewingContent digest sha256:7492247da117f9ccdd844548ea24c33d01c525a408cd9cea6d40e94896ca1061
  3. sha-9438f87034e9Content digest sha256:9438f87034e926e40e91e173207f42508d14281daa529e6b8035aa997bc5d7d5
  4. sha-a9bcbfae65e1Content digest sha256:a9bcbfae65e165dfb49db68f64a79979dfd474169f4c1d3b163f634bf096e69a