Reply router
Classify inbound replies to governed sends, durably suppress recipients who explicitly unsubscribe, route ordinary replies without sending, and stop ambiguous or untrusted cases for review.
Overview
reply-router turns a bounded inbound reply into exactly one governed outcome:
- an explicit unsubscribe tied to a sealed original-send receipt is appended to a recipient-keyed suppression stream;
- an ordinary reply becomes a routing decision for a separate governed lane;
- an ambiguous reply, mismatched recipient, or unsealed receipt stops with
needs_agent.
It never sends a message. A routed reply names send-as as a possible downstream
governed action, but this skill neither invokes it nor grants sending authority.
In the manual
Runner
route
Declared by its execution profile. Read the profile
SKILL.md
Reply Router
reply-router turns a bounded inbound reply into exactly one governed outcome:
- an explicit unsubscribe tied to a sealed original-send receipt is appended to a recipient-keyed suppression stream;
- an ordinary reply becomes a routing decision for a separate governed lane;
- an ambiguous reply, mismatched recipient, or unsealed receipt stops with
needs_agent.
It never sends a message. A routed reply names send-as as a possible downstream
governed action, but this skill neither invokes it nor grants sending authority.
Inputs
inbound_reply— JSON with a stablereply_id, sender (from.addressorfrom), body, and optional subject/timestamp.original_send_receipt— therunx.receipt.v1produced by the original governed send. Suppression requiresstatus: sealed, a checksum, a principal, a send plan, and an audience that matches the inbound sender.suppression_policy— declared unsubscribe phrases and the suppression data source.data_source_uriandresourcemay be supplied; conservative defaults are used otherwise.
Outcomes
Explicit unsubscribe
The deterministic classifier requires a sealed, checksummed original-send receipt and an exact recipient match. The graph then:
- reads the recipient-keyed stream with
registry:runx/data-store@0.1.2; - takes
projection.versionfrom that read; - calls the same pinned skill's
append_eventrunner with that value asexpected_versionand a stable idempotency key; and - emits a
runx.reply.routing.v1suppression result containing the committed data-operation evidence.
Only a digest-derived recipient aggregate id is stored; the event contains no raw reply body or recipient address.
Ordinary reply
The skill emits a runx.reply.routing.v1 handoff decision. It identifies the
queue and a separate governed action family, but performs no network or send
side effect.
Ambiguous or untrusted reply
The graph enters an operator agent-task. Without an explicit caller answer the
receipt seals as needs_agent. No data-store step or routing-result step runs on
this branch.
Deterministic policy
- Phrase matching is normalized and boundary-aware; substrings such as
unstoppabledo not count asstop. stopby itself is deliberately ambiguous unless an operator has explicitly included it insuppression_policy.unsubscribe_phrases.- Receipt shape, sealed status, checksum, principal, send plan, reply id, and recipient correspondence are checked before suppression is allowed.
- Idempotency keys are derived from receipt id, reply id, and recipient digest, making retries stable without exposing recipient data.
Harness
The inline harness contains the required cases:
sealed_unsubscribe_suppressionmust seal after a real read-then-CAS append;stop_ambiguous_or_unsealedmust returnneeds_agent, with no write and no routing decision.
Run it with runx CLI 0.6.14 or newer:
runx harness ./skills/reply-router --jsonPublished execution profile
The execution profile published with 0.1.2, shown as its exact bytes.
| Runner |
|
|---|---|
| Profile digest | sha256:f5ff86d7b3ec318a78c99377fe2cbac2059d12d65dbd9d07d0246cc7bf859b71 |
skill: reply-router
version: 0.1.2
catalog:
publisher: hengyiming720-ui
kind: graph
audience: public
visibility: public
role: canonical
category: growth
connectors:
store:
operations:
- events.append
- projection.read
runners:
route:
default: true
inputs:
inbound_reply:
type: json
required: true
description: The bounded inbound reply, including a stable reply id, sender, body, and observed timestamp.
original_send_receipt:
type: json
required: true
description: The sealed runx receipt for the governed outbound message that this reply references.
suppression_policy:
type: json
required: true
description: Recipient suppression policy and the declared data source used for durable append-only suppression events.
steps:
- id: classify
label: deterministically classify the inbound reply
skill: ./graph/classify-reply
inputs:
inbound_reply: $input.inbound_reply
original_send_receipt: $input.original_send_receipt
suppression_policy: $input.suppression_policy
- id: read-suppression
label: read the recipient suppression stream version
when:
equals: suppress
value: $steps.classify.reply_classification.route
operation: store/projection.read
input:
data_source_uri: $steps.classify.reply_classification.data_source_uri
resource: $steps.classify.reply_classification.resource
aggregate_id: $steps.classify.reply_classification.aggregate_id
- id: append-suppression
label: append the unsubscribe event with compare-and-swap
when:
equals: suppress
value: $steps.classify.reply_classification.route
operation: store/events.append
idempotency_key: $steps.classify.reply_classification.idempotency_key
input:
data_source_uri: $steps.classify.reply_classification.data_source_uri
resource: $steps.classify.reply_classification.resource
aggregate_id: $steps.classify.reply_classification.aggregate_id
expected_version: $steps.read-suppression.provider_operation.result.projection.version
event: $steps.classify.reply_classification.suppression_event
- id: suppression-result
label: emit the committed suppression result
when:
equals: suppress
value: $steps.classify.reply_classification.route
skill: ./graph/emit-result
inputs:
classification: $steps.classify.reply_classification.classification
route: $steps.classify.reply_classification.route
reason: $steps.classify.reply_classification.reason
suppression_result: $steps.append-suppression.provider_operation.result
- id: routing-result
label: emit a handoff decision without sending
when:
equals: route
value: $steps.classify.reply_classification.route
skill: ./graph/emit-result
inputs:
classification: $steps.classify.reply_classification.classification
route: $steps.classify.reply_classification.route
reason: $steps.classify.reply_classification.reason
routing_decision: $steps.classify.reply_classification.routing_decision
- id: stop-for-review
label: stop ambiguous or untrusted replies for an operator
when:
equals: stop
value: $steps.classify.reply_classification.route
agent:
role: operator
task: reply-routing-review
outputs:
review_decision:
required: false
inputs:
classification: $steps.classify.reply_classification.classification
reason: $steps.classify.reply_classification.reason
receipt_trust: $steps.classify.reply_classification.receipt_trust
evidence: $steps.classify.reply_classification.evidence
harness:
cases:
- name: sealed_unsubscribe_suppression
inputs:
inbound_reply:
reply_id: reply-unsubscribe-001
from:
address: subscriber@example.test
subject: "Re: Product update"
body: Please unsubscribe me from these messages.
received_at: 2026-06-29T10:00:00Z
original_send_receipt:
schema: runx.receipt.v1
status: sealed
receipt_id: receipt-send-001
checksum: sha256:fixture-sealed-send-001
principal:
type: account
ref: account:campaign-operator
send_plan:
action_family: send-as
channel: email
audience:
type: recipient
ref: subscriber@example.test
suppression_policy:
data_source_uri: local://reply-router/harness
store_id: reply-router-harness-v1
resource: reply_suppressions
unsubscribe_phrases:
- unsubscribe me
- remove me
expect:
status: sealed
operator_journeys:
- mode: standalone
confusors:
- inbox-triage
- send-as
request: Route this inbound reply.
expected_outcome: Append a suppression for unsubscribes or return a bounded routing decision, sending nothing.
- mode: composed
request: Continue this reply-router work from evidence already gathered upstream.
expected_outcome: Append a suppression for unsubscribes or return a bounded routing decision, sending nothing.
prior_evidence:
- The inbound reply and the original send receipt already supplied.
must_not_repeat:
- Do not reply to the sender.
- name: stop_ambiguous_or_unsealed
inputs:
inbound_reply:
reply_id: reply-stop-001
from:
address: subscriber@example.test
subject: "Re: Product update"
body: Stop.
received_at: 2026-06-29T10:05:00Z
original_send_receipt:
schema: runx.receipt.v1
status: open
receipt_id: receipt-send-unsealed-001
principal:
type: account
ref: account:campaign-operator
send_plan:
action_family: send-as
channel: email
audience:
type: recipient
ref: subscriber@example.test
suppression_policy:
data_source_uri: local://reply-router/harness
store_id: reply-router-harness-v1
resource: reply_suppressions
unsubscribe_phrases:
- unsubscribe me
- remove me
expect:
status: needs_agent
Published package and test evidence.
This exact version passed its recorded harness run: 2 checks passed · 0 failed.
Test result
| Harness result | Passed |
|---|---|
| Tested version | 0.1.2 |
| Recorded result | 2 checks passed · 0 failed |
| Result source | Run by the Runx registry at publication |
| Suite | runx-harness |
| Test recorded | |
| Declared cases | 2 |
| Test record | Open the recorded run |
Inspect receipt references
sha256:4d602dc791f5188a097f05d25b412e4bebdadda060e2179626aadb233e90f490sha256:1a4beabccce601c8cafcbe22d08a181ad81b1d8143835066011c9f9c984350d8Package identity
| Published revision | 0.1.2 |
|---|---|
| Content digest | sha256:3fccb79fdf5b7e9793bfa6f7902fd611ede8a9b55d98b7deb78fd4aa65046494 |
| SKILL.md digest | sha256:451b6600c3b7c18666e9360ee2ff76061ccfec5e50cf7591cfd18fc93f30fcf7 |
| Execution profile digest | sha256:f5ff86d7b3ec318a78c99377fe2cbac2059d12d65dbd9d07d0246cc7bf859b71 |
| Publisher identity | Unverified publisher · hengyiming720-ui |
| 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.2ViewingContent digest sha256:3fccb79fdf5b7e9793bfa6f7902fd611ede8a9b55d98b7deb78fd4aa65046494sha-a5a8c28f45c0Content digest sha256:a5a8c28f45c0232a4dcfdc921e8a0ea7a085cc0ef32239e5f4555d949cc385ebsha-f04bdb0bcd83Content digest sha256:f04bdb0bcd834447e9b8761a8c6558d8bbc49dee6932e9f0ddad0de209c234fesha-ba64a93d3f7bContent digest sha256:ba64a93d3f7b8469f40da838f5308ecae0adf1ba6fa4c737d970f424cccb700dsha-63f71f2009c0Content digest sha256:63f71f2009c09ca7ab2691059ac10f8a9755b0cc48593155d46490dcaab8606d