SSyncropel Docs

Routing Rules

Control which actor handles which records: match on domain and act, set targets, and let your approvals become rules.

Overview

Routing rules decide which actor handles an incoming record. When a record arrives, Syncropel checks the rules in order and sends it to the first matching target. Rules are settings, not code.

Creating a Rule

spl config add-rule \
  --name "code-to-dev" \
  --domain code \
  --act INTEND \
  --target did:sync:agent:dev

This rule says: when an INTEND record about the code domain arrives, route it to the dev agent.

Viewing Rules

spl config list-rules

Match Criteria

Rules match on combinations of fields:

CriterionDescriptionExample
--domainThe domain of the workcode, ops, data
--actThe act typeINTEND, KNOW, DO

All specified criteria must match (AND logic). Unspecified criteria are wildcards.

How Routing Works

Syncropel checks in this order:

  1. Explicit target: if the record has a body.to field, it goes there and no rules are checked.
  2. Pattern match: if a pattern that has worked reliably before matches, it is used (the cheapest option).
  3. Routing rules: your configured rules; the first match wins.
  4. Trust: the actor with the highest trust in the relevant domain.
  5. Default: a routing decision is proposed for you to approve.

Most records are handled by patterns and rules. Only genuinely new situations need a manual decision, and those decisions become new rules.

Rules Evolve

When Syncropel proposes a routing decision and you approve it, a routing rule is created automatically. The next identical situation is routed without asking.

You don't need to set up rules in advance. They build up from your decisions.

What's Next

On this page