Skip to main content
Version: 0.1.0

Decision Output

The engine produces a decision, confidence, rule IDs, explain, and optional constraints. This page describes the response shape, confidence calculation, and constraints reference.

Decisions & Confidence

  • Decision: ALLOW, DENY, or ALLOW_WITH_LIMITS.
  • Confidence: VERY_HIGH, HIGH, MEDIUM, or LOW.

Confidence Calculation

Base Confidence = 50. Each rule applies a confidenceDelta.

  • VERY_HIGH: Score ≥ 80
  • HIGH: Score ≥ 60
  • MEDIUM: Score ≥ 40
  • LOW: Score < 40
function mapConfidence(numericConfidence: number): ConfidenceTier {
if (numericConfidence >= 80) return "VERY_HIGH";
if (numericConfidence >= 60) return "HIGH";
if (numericConfidence >= 40) return "MEDIUM";
return "LOW";
}

type ConfidenceTier = "LOW" | "MEDIUM" | "HIGH" | "VERY_HIGH";

Machine-Readable Response

{
"decision": "ALLOW",
"confidence": "HIGH",
"constraints": [],
"retryAfter": null,
"ruleIds": ["allow_strong_builder"],
"version": "v1",
"explain": ["Strong builder credibility with sufficient social trust"],
"subjectHash": "subj_48c9a1"
}
FieldDescription
decisionALLOW, DENY, or ALLOW_WITH_LIMITS
confidenceLOW, MEDIUM, HIGH, or VERY_HIGH
constraintsApplied when decision is ALLOW_WITH_LIMITS (see below)
retryAfterSeconds to wait before retry; null if not applicable
ruleIdsArray of rule IDs that triggered the decision
versionEngine version (e.g. v1)
explainHuman-readable array of reasons
subjectHashHashed identity (when returned by API)

Constraints Reference

When a decision is ALLOW_WITH_LIMITS, one or more constraints are returned based on the Rule ID.

Rule IDConstraints AppliedMeaning
probation_inactivereduced_access, activity_requiredUser needs to be active/verify again.
probation_new_userprobation_period, limited_actionsNew user trial period.
probation_mixed_signalsreview_requiredManual review flagged.
limit_partial_signalsreduced_accessLimited features due to data gaps.
limit_comment_newrate_limitedE.g. 5 comments/hour.
limit_publish_unverifiedreview_queueContent goes to mod queue.
limit_governance_inactivereduced_weightVote counts for less.

Decision Logging (Optional)

BaseCred does not log score history. Optionally, systems may log decision metadata only:

interface DecisionLog {
subjectHash: string;
context: string;
decision: "ALLOW" | "DENY" | "ALLOW_WITH_LIMITS";
confidence: ConfidenceTier;
ruleIds: string[];
signalCoverage: number;
timestamp: number;
}

This enables audits and rule evaluation without storing raw scores or signals.