Skip to content

Add reply-router skill: classify inbound replies, suppress unsubscribe, route governed send-as#210

Open
armstrongsam25 wants to merge 3 commits into
runxhq:mainfrom
armstrongsam25:add-reply-router-skill
Open

Add reply-router skill: classify inbound replies, suppress unsubscribe, route governed send-as#210
armstrongsam25 wants to merge 3 commits into
runxhq:mainfrom
armstrongsam25:add-reply-router-skill

Conversation

@armstrongsam25

Copy link
Copy Markdown

reply-router skill

A native runx skill that classifies inbound replies against a sealed send receipt and either appends a recipient-keyed suppression event or emits a bounded governed routing decision without sending.

Behavior

  • Unsubscribe (sealed receipt + unsubscribe intent in reply text + matching policy signal): appends a recipient-keyed suppression event to durable data-store via an ungated CAS append_event against registry:runx/data-store@0.1.2. The resulting record is the compliance block the next send-as preflight reads as a fail-closed block.
  • Routed reply (sealed receipt + affirmative non-unsubscribe reply): emits a typed runx.reply.routing.v1 decision naming a separate governed send-as run that performs the send later. The skill never sends.
  • Ambiguous / unsealed (ambiguous content or unsealed original receipt): stops at a human approval lane (needs_agent) with no suppression write and no routing decision.

Files

  • skills/reply-router/SKILL.md — skill contract
  • skills/reply-router/X.yaml — graph runner profile with inline harness cases
  • skills/reply-router/classify.mjs — classify step (validates sealed receipt, matches signals)
  • skills/reply-router/append_event.mjs — suppression step (CAS append_event)
  • skills/reply-router/emit_route.mjs — routing step (runx.reply.routing.v1)
  • skills/reply-router/dogfood.mjs — self-contained dogfood runner
  • skills/reply-router/fixtures/ — test fixtures
  • skills/reply-router/evidence/ — harness, dogfood, verification, registry-read evidence

Harness

Both inline harness cases pass:

  • sealed_unsubscribe_suppression → sealed (suppress path)
  • stop_ambiguous_or_unsealed → needs_agent (stop path)

Safety

  • No network calls inside the skill scripts
  • No message sending
  • No suppression without matched unsubscribe evidence in reply text and policy
  • No route when the original send receipt is unsealed
  • No invented classification outside the inbound content

…e, route governed send-as

Skill structure:
- SKILL.md contract with compliance category
- X.yaml graph runner with classify → append_suppression / emit_routing / human_lane steps
- classify.mjs: validates sealed receipt, matches unsubscribe signals, routes affirmative replies
- append_event.mjs: CAS append_event to registry:runx/data-store@0.1.2 with idempotency key
- emit_route.mjs: emits runx.reply.routing.v1 naming a separate governed send-as run
- dogfood.mjs: self-contained runner exercising all branches

Harness cases:
- sealed_unsubscribe_suppression: sealed receipt + unsubscribe text → suppress
- stop_ambiguous_or_unsealed: unsealed receipt + ambiguous text → needs_agent

Fixtures: unsubscribe, ambiguous/unsealed, routed reply
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant