Decision Engine

The decision engine is the core of dispute resolution. It produces deterministic recommendations based on weighted signals.

We recommend. You enforce.

How It Works

  1. Collect all dispute signals (timing, evidence, history)
  2. Apply canonical weights to each signal
  3. Calculate split ratio and confidence
  4. Return recommendation

The engine never makes side effects. Given the same inputs, it produces the same outputs. Always.

Input Signals

Signal Description Weight
deadline_met Was the milestone deadline met? +20
deliverable_submitted Was any deliverable submitted? +30
evidence_balance Ratio of evidence from each party ±15
completion_ratio Estimated completion percentage Proportional
dispute_reason Category of the dispute Variable

Weights (v1.0.0)

Current canonical weights:

json
{
  "deadline_met": 0.20,
  "deliverable_submitted": 0.30,
  "evidence_balance": 0.15,
  "completion_ratio": 0.25,
  "dispute_context": 0.10
}

Weight changes require an RFC and version bump. Weights do not change without notice.

Output Structure

json
{
  "recommendation": "SPLIT",
  "confidence": 0.72,
  "signals": [
    "deadline_missed",
    "deliverable_partial",
    "evidence_balanced"
  ],
  "suggested_ratio": {
    "client": 0.40,
    "contractor": 0.60
  },
  "engine_version": "v1.0.0"
}

Field Meanings

recommendation FULL_RELEASE, FULL_REFUND, or SPLIT
confidence 0.0 to 1.0 — how certain the engine is
signals List of factors that influenced the decision
suggested_ratio Recommended split (must sum to 1.0)
engine_version Version of weights used

Decision Types

Type Meaning Ratio
FULL_RELEASE Contractor delivered, client pays client: 0, contractor: 1
FULL_REFUND Contractor failed, client gets refund client: 1, contractor: 0
SPLIT Partial completion, shared outcome Variable

Operator Override

The engine produces a recommendation. As the operator, you can adjust it within bounds:

  • Maximum adjustment: ±30% from suggested ratio
  • Justification required for all decisions
  • Override is audit-logged
json
// Engine suggested: { client: 0.40, contractor: 0.60 }
// Allowed range: { client: 0.10-0.70, contractor: 0.30-0.90 }

// Valid override
{
  "decision": "SPLIT",
  "final_ratio": { "client": 0.35, "contractor": 0.65 },
  "justification": "Milestone was late but functional"
}

// Invalid (exceeds ±30%)
{
  "decision": "SPLIT",
  "final_ratio": { "client": 0.05, "contractor": 0.95 }
}  // Rejected: out of bounds

Determinism Guarantee

The engine is a pure function:

  • No external API calls
  • No random number generation
  • No current time access (time is injected)
  • Same inputs → Same outputs (always)

This means any decision can be replayed and verified from the audit log.

What Decisions Mean

A decision is:

  • ✓ A defensible recommendation
  • ✓ Based on recorded signals
  • ✓ Reproducible and auditable

A decision is NOT:

  • ✗ A legal judgment
  • ✗ A payment instruction
  • ✗ Automatically enforced
You receive ratios. You execute payouts. We don't move money.