runs in your browser · pure functiontanh · signed (−1,1)Apache-2.0 · zero-dep

Is this agent trending toward trust — or away?

Sigmoid gives a [0,1] level ("how trusted"). tanh(x) gives the part it can't: a signed margin in (−1,1) with a true zero. Here it's a consensus margin over an agent's audited record — tanh(gain·(approved − rejected)). +1 earned, 0 a dead split, −1 contested. That sign is what you'd steer delegation bounds on — e.g. raise an agent's auto-approval ceiling only while it's positive. Drag the record and watch the needle cross zero.

An agent's audited recordkernel source →
approved actions5
counterparties / the constitution accepted these
rejected / disputed actions0
denied, contested, or rolled back
Consensus margin (live)

Honest scope. This is the same family of deterministic, rounded-to-4dp pure kernels as the sigmoid reputation and coalition kernels — same verdict in browser, edge, and Node, so a consensus margin can be signed into the audit chain. The real signal is each agent's approved vs denied rows in the audit ledger over a recent window — though this page is the primitive and its golden tests, not yet wired into the live delegation engine (that's the intended next step). It is genuinely additive to the trust LEVEL, not a restatement of it: an agent can sit at a high level yet have a negative margin (recently sliding) — exactly the case where you want to stop widening its delegation. tanh is an odd function, so the curve is symmetric through the origin: flip approvals and rejections and the margin flips sign exactly. Source: flowdesk-tanh-kernel.js.