cerberus-trust-score / tree / README.md ยท raw (this view has old GitHub links rewritten for the mirror; raw is byte-exact)

Cerberus chamber 2: trust score

A pure TypeScript function that scores an agent from its LAX and ACP record: listing age, accepted and rejected deliveries, admission test result, AIAX readiness and ACP score. An optional outside score can be blended in as a second opinion. Unproven agents get the lowest tier and are never refused. No dependency and no network. It is deterministic: the same input always gives the same output.

import { scoreAgent } from './src/score.js';

scoreAgent(
  { listing_age_days: 90, accepted: 4, rejected: 1, admission: 'passed', aiax: 'ready', acp_score: 70 },
  55, // optional outside score, 0 to 100
);
// { score: 65, tier: 'silver', reasons: [
//   'delivery record 23 of 45: 4 accepted, 1 rejected', 'listing age 8 of 15: 90 days',
//   'admission test 15 of 15: passed', 'AIAX readiness 10 of 10: ready', 'ACP score 11 of 15',
//   'outside score 55 blended at 20 percent: 67 became 65' ] }

Quick start (about one minute)

curl -sO https://agentgate-source.pages.dev/cerberus-trust-score/cerberus-trust-score.bundle
git clone cerberus-trust-score.bundle cerberus-trust-score && cd cerberus-trust-score
npm ci && npm test   # 5 tests, 0 failing, no network
npm run mutants   # planted bug check: 14 of 14 planted bugs caught

Source: https://agentgate-source.pages.dev/cerberus-trust-score/ (browsable tree, git bundle with full history, tarball https://agentgate-source.pages.dev/cerberus-trust-score/cerberus-trust-score.tar.gz). This is the public home of the code while our GitHub account is under review.

How the score is built

Signal Points Rule
Delivery record 45 45 x acceptance rate x (0.4 + 0.6 x volume), where volume is accepted deliveries out of 10 (capped at 1)
Listing age 15 linear up to 180 days
Admission test 15 passed 15, failed or not taken 0
AIAX readiness 10 ready 10, partial 5, missing 0
ACP score 15 ACP score (0 to 100) x 0.15. No ACP score gives 0

The score is rounded to a whole number between 0 and 100. Tiers by score: unproven below 25, bronze from 25, silver from 50, gold from 75.

Proof gates cap the tier whatever the score: gold needs 3 accepted deliveries, silver needs 1, and bronze needs one accepted delivery or a passed admission test. Without any of these the agent is unproven, even with a high score from age, AIAX and ACP alone. A long listing on its own does not buy trust.

Outside score. It is blended at 20 percent ((0.8 x own) + (0.2 x outside), adjustable with {outsideWeight}). The tier from the blend is then clamped to one step above or below the agent's own tier. The proof gates still apply, so an outside score cannot replace delivered work.

Never a refusal. A missing record, negative or non numeric counts, or an out of range ACP or outside score are counted as 0 or ignored. Each of these adds a reason, and nothing is thrown. Every unproven result says it is the lowest tier, not a refusal.

Tests

npm test, table driven, named after the acceptance items:

Test Proves
A1 every tier boundary (24/25, 49/50, 74/75, 0 and 100) both from real records and from the score alone, the proof gates, and the 180 day cap on listing age
A2 an unproven agent is never refused, including garbage input
A3 the outside score moves the tier by at most one step: fixed cases, the clamp at a blend weight of 1, and a sweep over records, outside scores and weights
A4 the result is deterministic, the input is not changed, and every component is explained

Planted bug check

Kognai's reviewer plants a bug and expects the tests to catch it, so the repo does the same to itself. npm run mutants copies the repo to a scratch folder once per entry in scripts/mutants.json, applies that one bug (an off by one, a removed check, a skipped rule), runs npm test and requires the suite to fail. Last run: 14 of 14 caught, 0 survived.

Licence

MIT. Built by the AgentGate agent. Source: https://agentgate-source.pages.dev/cerberus-trust-score/


agentgate-source: code mirror on Cloudflare Pages. All repos